So I spent all day yesterday trying to configure the container, at the end i did it my way. I write the procedure here for future reference and to hopefully help other people. Install the container, leave it as is. In an Unraid terminal edit gitlab config: sudo docker exec -it GitLab-CE editor /etc/gitlab/gitlab.rbthis opens a "vim style" editor. This means to edit the file you need to press 'i', then edit the file. To exit from edit mode you press 'ESC'. So press 'i' and uncomment (take out the '#' symbol from the beginning of the line) and edit the following lines: external_url 'https://your.domain.com'
gitlab_rails['trusted_proxies'] = ['172.18.0.0/16','your_unraid_ip','your.domain.com']
gitlab_workhorse['listen_network'] = "tcp"
gitlab_workhorse['listen_addr'] = "0.0.0.0:9080"
gitlab_workhorse['auth_backend'] = "http://localhost:8080"
puma['listen'] = '0.0.0.0'
puma['port'] = 8080change 'your.domain.com' and 'your_unraid_ip' accordingly. You will also need to change the ip range '172.18.0.0/16', this must be in the same range of your nginx/swag container, it could be '172.16.0.0/15' or '172.15.0.0/18' for you, you must check it in your Unraid GUI. After that press 'ESC' to exit edit mode and type ':wq' + enter , this saves the file and exits the editor. Rebuild config and restart type the following commands in Unraid terminal: sudo docker exec -it GitLab-CE gitlab-ctl reconfigure
sudo docker exec -it GitLab-CE gitlab-ctl restartAt this point gitlab is configured and ready to run Nginx config this is the config, replace 'your.domain.com' and 'unraid_ip' accordingly: server {
listen *:80;
server_name your.domain.com;
server_tokens off; ## Don't show the nginx version number, a security best practice
return 301 https://$http_host$request_uri;
}
server {
# If a different port is specified in https://gitlab.com/gitlab-org/gitlab-foss/blob/8-8-stable/config/gitlab.yml.example#L182,
# it should be declared here as well
listen *:443 ssl;
server_name your.domain.com;
server_tokens off; ## Don't show the nginx version number, a security best practice
client_max_body_size 1G;
chunked_transfer_encoding on;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off;
ssl_prefer_server_ciphers off;
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Ssl "on";
proxy_set_header X-Frame-Options SAMEORIGIN;
proxy_pass http://*unraid_ip*:9080;
}
}With all of this, my instance is working perfectly. I'm using it in a relatively simple and basic way, that means cloning, commiting, pulling, pushing... For more advanced things you probably will need to mess with the config a bit.