-
Notifications
You must be signed in to change notification settings - Fork 39
/
docker-compose.yml
94 lines (88 loc) · 2.54 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# 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}