Skip to content

Instantly share code, notes, and snippets.

@ngpestelos
Created October 28, 2016 12:43
Show Gist options
  • Save ngpestelos/eafa39c194ce08856766c081c7b0c41f to your computer and use it in GitHub Desktop.
Save ngpestelos/eafa39c194ce08856766c081c7b0c41f to your computer and use it in GitHub Desktop.
version: '2'
services:
redis:
restart: always
image: sameersbn/redis:latest
command:
- --loglevel warning
volumes:
- redis_data:/var/lib/redis
postgresql:
restart: always
image: sameersbn/postgresql:9.5
volumes:
- postgresql_data:/var/lib/postgresql
environment:
- DB_USER=gitlab
- DB_PASS=password
- DB_NAME=gitlabhq_production
- DB_EXTENSION=pg_trgm
registry:
restart: always
image: registry:2
volumes:
- registry_data:/registry
- /opt/letsencrypt:/certs
environment:
- REGISTRY_LOG_LEVEL=info
- REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/registry
- REGISTRY_AUTH_TOKEN_REALM=https://example.com/jwt/auth
- REGISTRY_AUTH_TOKEN_SERVICE=container_registry
- REGISTRY_AUTH_TOKEN_ISSUER=gitlab-issuer
- REGISTRY_AUTH_TOKEN_ROOTCERTBUNDLE=/certs/live/example.com/fullchain.pem
- REGISTRY_STORAGE_DELETE_ENABLED=true
ports:
- "5500:5000"
gitlab:
restart: always
image: sameersbn/gitlab:8.12.7
volumes:
- gitlab_data:/home/git/data
- registry_data:/registry
- /opt/letsencrypt:/certs
- /opt/dhparam:/dhparam
depends_on:
- redis
- postgresql
- registry
ports:
- "80:80"
- "2200:22"
- "443:443"
environment:
- DB_HOST=postgresql
- DB_PORT=5432
- DB_USER=gitlab
- DB_PASS=password
- DB_NAME=gitlabhq_production
- REDIS_HOST=redis
- REDIS_PORT=6379
- GITLAB_SSH_PORT=2200
- GITLAB_HTTP_PORT=80
- GITLAB_HOST=example.com
- GITLAB_SECRETS_DB_KEY_BASE=deadbeef
- GITLAB_SECRETS_SECRET_KEY_BASE=cafebabe
- GITLAB_SECRETS_OTP_KEY_BASE=asdfasdf
- GITLAB_REGISTRY_ENABLED=true
- GITLAB_REGISTRY_HOST=example.com
- GITLAB_REGISTRY_PORT=5500
- GITLAB_REGISTRY_API_URL=http://registry:5000
- GITLAB_REGISTRY_KEY_PATH=/certs/live/example.com/privkey.pem
- GITLAB_HTTPS=true
- SSL_CA_CERTIFICATES_PATH=/certs/live/example.com/fullchain.pem
- SSL_CERTIFICATE_PATH=/certs/live/example.com/fullchain.pem
- SSL_KEY_PATH=/certs/live/example.com/privkey.pem
- SSL_DHPARAM_PATH=/dhparam/dhparam.pem
volumes:
redis_data: {}
postgresql_data: {}
gitlab_data: {}
registry_data: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment