Created
September 5, 2017 09:25
-
-
Save jwdevantier/5904d6664f4034400537fb5fa4f7431a to your computer and use it in GitHub Desktop.
Example docker CE deployment setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.3" | |
services: | |
gitlab: | |
image: 'gitlab/gitlab-ce:9.5.2-ce.0' | |
restart: always | |
hostname: 'git.example.com' | |
links: | |
- postgresql:postgresql | |
- redis:redis | |
environment: | |
GITLAB_OMNIBUS_CONFIG: | | |
postgresql['enable'] = false | |
gitlab_rails['db_username'] = "gitlab_user" | |
gitlab_rails['db_password'] = "s3cr3t" | |
gitlab_rails['db_host'] = "postgresql" | |
gitlab_rails['db_port'] = "5432" | |
gitlab_rails['db_database'] = "gitlab_prod" | |
gitlab_rails['db_adapter'] = 'postgresql' | |
gitlab_rails['db_encoding'] = 'utf8' | |
redis['enable'] = false | |
gitlab_rails['redis_host'] = 'redis' | |
gitlab_rails['redis_port'] = '6379' | |
external_url 'http://git.example.com:9090' | |
gitlab_rails['gitlab_shell_ssh_port'] = 2224 | |
gitlab_monitor['enable'] = false | |
prometheus['enable'] = false | |
ports: | |
# both ports must match the port from external_url above | |
- "9090:9090" | |
# the mapped port must match ssh_port specified above. | |
- "2224:22" | |
volumes: | |
- gitlab_config:/etc/gitlab:rw | |
- gitlab_logs:/var/log/gitlab:rw | |
- gitlab_data:/var/opt/gitlab:rw | |
postgresql: | |
restart: always | |
image: postgres:9.6.2-alpine | |
environment: | |
- POSTGRES_USER=gitlab_user | |
- POSTGRES_PASSWORD=s3cr3t | |
- POSTGRES_DB=gitlab_prod | |
volumes: | |
- postgres_data:/var/lib/postgresql/data:rw | |
redis: | |
restart: always | |
image: redis:3.0.7-alpine | |
volumes: | |
gitlab_config: | |
gitlab_logs: | |
gitlab_data: | |
postgres_data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment