-
Notifications
You must be signed in to change notification settings - Fork 1
/
compose.prod.yml
40 lines (37 loc) · 1.19 KB
/
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
services:
flask:
build:
args:
PIP_REQUIREMENTS: requirements/prod.txt
expose:
- 8001
restart: always
labels:
- "traefik.enable=true"
- "traefik.http.routers.myapp1.rule=Host(`${PORTAL_HOST}`)"
- "traefik.http.routers.myapp1.entrypoints=websecure"
- "traefik.http.routers.myapp1.tls.certresolver=myresolver"
- "traefik.http.services.flask.loadbalancer.server.port=8001"
postgres:
restart: always
redis:
restart: always
traefik:
image: traefik:3.2
command:
#- "--api.insecure=true"
- "--providers.docker=true"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--entrypoints.web.http.redirections.entryPoint.to=websecure"
- "--entrypoints.web.http.redirections.entryPoint.scheme=https"
- "--certificatesresolvers.myresolver.acme.tlsChallenge=true"
- "--certificatesresolvers.myresolver.acme.email=${ACME_EMAIL}"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./letsencrypt:/letsencrypt