-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.prod.yml
72 lines (68 loc) · 1.55 KB
/
docker-compose.prod.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
# Production
version: '3.7'
services:
lethe:
image: letheapi_prod:0.0.1
entrypoint: /app/production-entrypoint.sh
deploy:
replicas: 2
restart_policy:
condition: on-failure
delay: 10s
max_attempts: 3
window: 120s
labels:
- traefik.http.routers.lethe.rule=Host(`lethe.localhost`)
- traefik.http.services.lethe.loadbalancer.server.port=9999
environment:
- SL_DATABASE_URL
- SL_APOLLO_ENGINE_API_KEY
- NOW_TOKEN
- PORT
secrets:
- apollo_api_key
- sl_database_url
- now_token
- port
command: node /app/dist/index.js
networks:
- lethe-network
# Reverse Proxy
traefik:
image: traefik:2.1
volumes:
- /var/run/docker.sock:/var/run/docker.sock ro
ports:
- '80:80'
command:
- --entrypoints.web.address=:80
- --ping
- --providers.docker.swarmMode=true
healthcheck:
test: traefik healthcheck --ping
deploy:
mode: global
update_config:
failure_action: rollback
restart_policy:
condition: on-failure
placement:
constraints:
- node.role == manager
labels:
- traefik.http.routers.traefik.rule=Host(`traefik.localhost`)
- traefik.http.services.traefik.loadbalancer.server.port=8080
networks:
- lethe-network
networks:
lethe-network:
name: lethe-network
secrets:
apollo_api_key:
external: true
sl_database_url:
external: true
now_token:
external: true
port:
external: true