Skip to content

Instantly share code, notes, and snippets.

@emexelem
Created September 29, 2017 21:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emexelem/d56936aa474cbe4d161a434437324b5b to your computer and use it in GitHub Desktop.
Save emexelem/d56936aa474cbe4d161a434437324b5b to your computer and use it in GitHub Desktop.
gitlab docker-compose
version: '2'
services:
gitlab:
container_name: gitlab
image: gitlab/gitlab-ce:latest
restart: always
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://gitlab.mydomain.net'
nginx['redirect_http_to_https'] = true
nginx['custom_gitlab_server_config']="location ^~ /.well-known {\n alias /var/www/letsencrypt/.well-known;\n}\n"
nginx['ssl_certificate']= "/etc/letsencrypt/live/gitlab.mydomain.net/fullchain.pem"
nginx['ssl_certificate_key'] = "/etc/letsencrypt/live/gitlab.mydomain.net/privkey.pem"
ports:
- '80:80'
- '443:443'
- '2222:22'
volumes:
- ${DOCKER_VOLUMES_BASE_FOLDER}/gitlab/config:/etc/gitlab
- ${DOCKER_VOLUMES_BASE_FOLDER}/gitlab/logs:/var/log/gitlab
- ${DOCKER_VOLUMES_BASE_FOLDER}/gitlab/data:/var/opt/gitlab
- /var/www/letsencrypt:/var/www/letsencrypt
- /etc/letsencrypt:/etc/letsencrypt
logging:
driver: "json-file"
options:
max-size: "500k"
max-file: "20"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment