-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-swarm-traefik.yml
97 lines (91 loc) · 2.89 KB
/
docker-swarm-traefik.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
95
96
97
version: "3.8"
# https://docs.docker.com/compose/compose-file/compose-file-v3/
services:
nginx:
image: nginx:alpine
# https://hub.docker.com/_/nginx
volumes:
- phabricator:/var/www/html
networks:
- phabricator
- traefik
configs:
- source: phabricator_nginx.conf
target: /etc/nginx/templates/nginx.conf.template
environment:
- NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx
# https://nginx.org/en/docs/ngx_core_module.html#worker_processes
- NGINX_WORKER_PROCESSES=auto
# https://nginx.org/en/docs/ngx_core_module.html#worker_rlimit_nofile
- NGINX_WORKER_RLIMIT_NOFILE=65535
# https://nginx.org/en/docs/ngx_core_module.html#worker_connections
- NGINX_WORKER_CONNECTIONS=65535
# https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size
- NGINX_CLIENT_MAX_BODY_SIZE=32m
# https://nginx.org/en/docs/http/ngx_http_core_module.html#client_body_timeout
- NGINX_CLIENT_BODY_TIMEOUT=90s
- NGINX_HOST=phabricator.yourdomain.test
deploy:
labels:
- "traefik.enable=true"
- "traefik.http.routers.bookstack.entrypoints=websecure"
- "traefik.http.routers.bookstack.rule=Host(`phabricator.yourdomain.test`)"
- "traefik.http.services.bookstack.loadbalancer.server.port=80" # Port traefik needs to route traffic to
mariadb:
image: mariadb:latest
# https://hub.docker.com/_/mariadb
volumes:
- phabricator_sql:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/phabricatorsql_root_password
secrets:
- phabricatorsql_root_password
configs:
- source: phabricator_mariadb.cnf
target: /etc/mysql/conf.d/phabricator.cnf
networks:
- phabricator_db
phabricator:
image: zeigren/phabricator:latest
# https://hub.docker.com/r/zeigren/phabricator
volumes:
- phabricator:/var/www/html
- phabricator_ssh_config:/etc/ssh
- phabricator_repo:/var/repo
environment:
# set UPGRADE_ON_RESTART to true on first start up or to update Phabricator
- UPGRADE_ON_RESTART=true
- PHAB_PHABRICATOR_BASE_URI=https://phabricator.yourdomain.test
- PHAB_MYSQL_PASS=DOCKER-SECRET->phabricatorsql_root_password
# - PHAB_CLUSTER_MAILERS=true
networks:
- phabricator
- phabricator_db
ports:
# SSH Port
- 2530:2530
# configs:
# - source: phabricator_mailers.json
# target: /usr/src/docker-phab/mailers.json
secrets:
- phabricatorsql_root_password
volumes:
phabricator_sql:
phabricator:
phabricator_ssh_config:
phabricator_repo:
networks:
phabricator:
phabricator_db:
traefik:
external: true
secrets:
phabricatorsql_root_password:
external: true
configs:
phabricator_nginx.conf:
external: true
phabricator_mariadb.cnf:
external: true
# phabricator_mailers.json:
# external: true