-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.prod.yml
98 lines (90 loc) · 2.82 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
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
98
version: "3.5"
networks:
proxy:
# Setting the name is necessary for the only purpose to have a fixed and deterministic network name (for Traefik),
# without any prefix, as otherwise Docker Composes adds a prefix based on the root folder name.
name: proxy
services:
elasticsearch:
restart: always
qa:
restart: always
environment:
- ANSWER_THREADS=8
- BATCH_SIZE=672
- FLASK_ENV=production
labels:
- logio=yes
db:
restart: always
frontend:
restart: always
build:
args:
- app_env=production
networks:
- proxy
depends_on:
- traefik
labels:
- traefik.enable=true
- traefik.docker.network=proxy
- traefik.http.routers.frontend.rule=Host(`${DOMAIN}`)
api:
restart: always
networks:
- proxy
environment:
- DEBUG=False
depends_on:
- traefik
labels:
- traefik.enable=true
- traefik.docker.network=proxy
- traefik.http.routers.api.rule=Host(`${DOMAIN}`) && Path(`/api`)
- logio=yes
logio:
image: geniousphp/logio
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
ports:
- 28778:28778 # FIXME: With the domain we cax expose the logs through Traefik
traefik:
image: traefik:v2.2
command:
- --api.insecure=true
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --entrypoints.web.address=:80
# - --entryPoints.websecure.address=:443
# - --certificatesResolvers.le.acme.email=${TRAEFIK_EMAIL}
# - --certificatesResolvers.le.acme.storage=acme.json
# - --certificatesResolvers.le.acme.tlsChallenge=true
# - --certificatesResolvers.le.acme.httpChallenge=true
# - --certificatesResolvers.le.acme.httpChallenge.entryPoint=web
- --log.level=DEBUG
restart: always
networks:
- proxy
ports:
- 80:80
- 443:443
- 8080:8080 # TODO: remove in the future
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
# - ./acme.json:/acme.json
# environment:
# - DOMAIN
# - TRAEFIK_EMAIL
labels:
# # Redirect all HTTP to HTTPS permanently
# - traefik.http.routers.http_catchall.rule=HostRegexp(`{any:.+}`)
# - traefik.http.routers.http_catchall.entrypoints=web
# - traefik.http.routers.http_catchall.middlewares=https_redirect
# - traefik.http.middlewares.https_redirect.redirectscheme.scheme=https
# - traefik.http.middlewares.https_redirect.redirectscheme.permanent=true
# # Dashboard
- traefik.http.routers.api.rule=Host(`${DOMAIN}`) && Path(`/proxy`)
- traefik.http.routers.api.service=api@internal
# - traefik.http.routers.api.tls=true
# - traefik.http.routers.api.tls.certresolver=le