Hi I have an issue with my Docker GitLab setup.
What I’m trying to achieve:
- running GitLab inside a Docker container
- access GitLab through a subdomain (gitlab.mydomain.com) at ports 80 and 443 for https
- manage SSL through a wildcard certificate for *.mydomain.com provided by LetsEncrypt and Plesk (already in use for subdomains managed by Plesk)
- beeing able to run build tasks in GitLab container (npm scripts etc.) and finally move specific output files to directories of subdomains managed by Plesk (outside of container)
What I did so far:
- got a v-server running Ubuntu 18.04.2 with preinstalled Plesk Onyx 17.8.11
- setup mydomain through Plesk
- setup LetsEncrypt wildcard certificate for mydomain through Plesk
- installed Docker via ssh (not Plesk)
- ran GitLab inside a container at mydomain.com:30080
I’m completely new to server envs and Docker so I’m not sure about the needed structure of things. Maybe you guys know what to do?
I solved my problem by:
- Creating a subdomain in plesk
- Add existing wildcard certificate to subdomain
- Installing nginx service (and docker extension, optional)
- Running gitlab container with specific ports for http, https and ssh
- Routing ports in subdomain settings either with additional nginx directives or through docker extension
But there a still 2 problems to solve:
I can connect using the ssl certificate provided by plesk, but the Gitlab connection itself is http only. So I need a seperate certificate for Gitlab
I can only route one port using docker extension or additional nginx directives. So I can’t use e.g. Sourcetree to access Gitlab over ssh, as I can’t tell Sourcetree to use port xxx for ssh connection. I still need to find a solution for this one.