Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
GitLab self-host docker-compose example
# docker-compose.yml
web:
image: 'gitlab/gitlab-ee:latest'
restart: always
hostname: '$GITLAB_HOSTNAME'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://$GITLAB_HOSTNAME'
gitlab_rails['gitlab_shell_ssh_port'] = 2224
# Add any other gitlab.rb configuration here, each on its own line
ports:
- '80:80'
- '2224:22'
volumes:
- '$GITLAB_HOME/config:/etc/gitlab'
- '$GITLAB_HOME/logs:/var/log/gitlab'
- '$GITLAB_HOME/data:/var/opt/gitlab'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment