Skip to content

Instantly share code, notes, and snippets.

@schube
Created March 27, 2021 16:53
Show Gist options
  • Select an option

  • Save schube/e1f009448455e58d30a8ff491b357245 to your computer and use it in GitHub Desktop.

Select an option

Save schube/e1f009448455e58d30a8ff491b357245 to your computer and use it in GitHub Desktop.
Gitlab Registry on docker with reverse proxy
<VirtualHost *:443>
ServerAdmin [email protected]
ServerName registry.mydomain.com
SSLEngine on
SSLCompression Off
SSLProtocol all -SSLv2 -SSLv3
SSLCertificateFile /etc/letsencrypt/live/registry.mydomain.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/registry.mydomain.com/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/registry.mydomain.com/fullchain.pem
ServerSignature Off
ProxyRequests Off
<Location />
ProxyPass http://127.0.0.1:6060/ retry=3
ProxyPassReverse http://127.0.0.1:6060/
</Location>
</VirtualHost>
services:
web:
image: 'gitlab/gitlab-ce:latest'
restart: unless-stopped
container_name: gitlab
hostname: 'gitlab.mydomain.com'
environment:
GITLAB_OMNIBUS_CONFIG: |
# General Gitlab Settings
external_url 'https://gitlab.mydomain.com'
letsencrypt['enable'] = false
nginx['listen_https'] = false
nginx['listen_port'] = 80
# Registry Settings
registry_external_url 'https://registry.mydomain.com'
gitlab_rails['registry_enabled'] = true
#gitlab_rails['registry_host'] = "registry.mydomain.com"
registry_nginx['listen_port'] = 5005
registry['registry_http_addr'] = "gitlab.mydomain.com:5005"
gitlab_rails['registry_path'] = "/var/registry/storage"
registry_nginx['enable'] = false
registry_nginx['listen_https'] = false
ports:
- '6060:5005'
- '2080:80'
- '20443:443'
- '2022:22'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment