-
Notifications
You must be signed in to change notification settings - Fork 48
/
production.yml
95 lines (95 loc) · 2.36 KB
/
production.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
version: '3'
volumes:
dbdata:
acme:
networks:
web:
services:
db:
image: mongo
command: --smallfiles
networks:
- web
volumes:
- dbdata:/data/db
deploy:
restart_policy:
condition: on-failure
web:
image: registry.gitlab.com/codingfriend/feathers-vue:latest
networks:
- web
env_file:
- environment.env
depends_on:
- db
deploy:
replicas: 2
update_config:
parallelism: 1
delay: 15s
restart_policy:
condition: on-failure
labels:
- "traefik.docker.network=web"
- "traefik.port=80"
- "traefik.enable=true"
- "traefik.frontend.rule=PathPrefix:/;"
- "traefik.frontend.rule=Host:${LETS_ENCRYPT_DOMAIN};"
- "traefik.backend.loadbalancer.sticky=true"
loadbalancer:
image: traefik
command: --docker \
--docker.swarmmode \
--docker.watch \
--web \
--defaultEntryPoints='http,https' \
--entryPoints='Name:http Address::80' \
--entryPoints='Name:https Address::443 TLS' \
--docker.exposedbydefault=false \
--acme \
--acme.entryPoint='https' \
--acme.email=${LETS_ENCRYPT_EMAIL} \
--acme.ondemand=false \
--acme.acmelogging=true \
--acme.onhostrule=true \
--acme.caserver="https://acme-staging.api.letsencrypt.org/directory" \
--acme.storage='/etc/traefik/acme/acme.json'
--loglevel=DEBUG
ports:
- "80:80"
- "443:443"
- "9090:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- acme:/etc/traefik/acme
deploy:
restart_policy:
condition: any
mode: replicated
replicas: 1
update_config:
delay: 2s
placement:
constraints: [node.role == manager]
networks:
- web
depends_on:
- web
visualizer:
image: dockersamples/visualizer:stable
stop_grace_period: 1m30s
networks:
- web
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
deploy:
placement:
constraints: [node.role == manager]
labels:
- "traefik.docker.network=web"
- "traefik.port=8080"
- "traefik.frontend.rule=PathPrefix:/;"
- "traefik.frontend.rule=Host:monitor.${LETS_ENCRYPT_DOMAIN};"
- "traefik.enable=true"
- "traefik.backend.loadbalancer.sticky=true"