Created
September 29, 2017 21:06
-
-
Save emexelem/d56936aa474cbe4d161a434437324b5b to your computer and use it in GitHub Desktop.
gitlab docker-compose
This file contains hidden or 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: '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