By Nigel James
I have a gitlab DO droplet which is working well but is underused.
I would like to use it for some other nodejs purposes but is there anything I need to think about to not kill gitlabs before I start to deploy node and nginx?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
This comment has been deleted
I’d recommend spinning up another temporary GitLab instance to do some testing first. It will allow you to break things without worrying about your production instance. Since you’re only charged for what you use, it will only cost pennies to do a few hours of testing.
In general, one thing to be aware of is that the GitLab one-click app uses their “omnibus” installation. It’s really designed to run in a self contained manner and installs it own libraries including Nginx under /opt that are managed using Chef. So you’ll need to override some things in /etc/gitlab/gitlab.rb To use the system Nginx that you plan on installing, add:
nginx['enable'] = false
web_server['external_users'] = ['www-data']
Then reconfigure GitLab with: sudo gitlab-ctl reconfigure
Then install Nginx as normal and set up a proxy pass to serve GitLab through it. Your Nginx configuration will need something like:
upstream gitlab {
server unix:/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket;
}
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx/html;
index index.html index.htm;
server_name localhost;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://gitlab;
}
}
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.