Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

95 lines (88 sloc) 2.54 KB
# https://hub.docker.com/r/gitlab/gitlab-ce
# https://docs.gitlab.com/omnibus/settings/nginx.html#using-a-non-bundled-web-server
version: '2.1'
services:
gitlab:
image: gitlab/gitlab-ce:${GITLAB_CE_VERSION}
restart: always
container_name: gitlab
hostname: "${GITLAB_HOST}"
environment:
- TZ=${TZ}
- VIRTUAL_HOST=${GITLAB_HOST},${REGISTRY_HOST}
- VIRTUAL_PORT=80
- LETSENCRYPT_HOST=${GITLAB_HOST},${REGISTRY_HOST}
- LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
ports:
- ${GITLAB_SSH_IP}:${GITLAB_SSH_PORT}:22
volumes:
- './volumes/config:/etc/gitlab'
- './volumes/logs:/var/log/gitlab'
- './volumes/data:/var/opt/gitlab'
depends_on:
- redis
- postgres
networks:
- default
- nginx_proxy
pages:
image: gitlab/gitlab-ce:${GITLAB_CE_VERSION}
restart: always
container_name: gitlab_pages
hostname: "${PAGES_HOST}"
environment:
- TZ=${TZ}
- VIRTUAL_HOST=${PAGES_HOST},*.${PAGES_HOST}
- VIRTUAL_PORT=8090
- HTTPS_METHOD=nohttps
# - LETSENCRYPT_HOST=${PAGES_HOST}
# - LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
expose:
- 8090/tcp
entrypoint:
- /opt/gitlab/embedded/bin/gitlab-pages
command:
- -listen-proxy
- "0.0.0.0:8090"
- -pages-domain
- "${PAGES_HOST}"
- -pages-root
- "/var/opt/gitlab/gitlab-rails/shared/pages"
volumes:
- './volumes/data/gitlab-pages:/var/opt/gitlab/gitlab-pages:rw'
- './volumes/data/gitlab-rails/shared/pages:/var/opt/gitlab/gitlab-rails/shared/pages:ro'
networks:
- nginx_proxy
runner:
image: gitlab/gitlab-runner:${GITLAB_RUNNER_VERSION}
restart: always
container_name: gitlab_runner
environment:
- CI_SERVER_URL=https://${GITLAB_HOST}/
volumes:
- ./volumes/runner:/etc/gitlab-runner
- /var/run/docker.sock:/var/run/docker.sock:rw
postgres:
image: postgres:${POSTGRES_VERSION}
restart: always
container_name: gitlab_postgresql
# https://github.com/docker-library/docs/tree/master/postgres#environment-variables
environment:
- POSTGRES_USER=gitlab
- POSTGRES_DB=gitlabhq_production
volumes:
- ./volumes/postgres:/var/lib/postgresql/data
restart: always
redis:
image: redis:${REDIS_VERSION}
restart: always
container_name: gitlab_redis
command:
- --loglevel warning
volumes:
- ./volumes/redis:/var/lib/redis
restart: always
networks:
nginx_proxy:
external:
name: ${NGINX_PROXY_NETWORK_NAME}
You can’t perform that action at this time.