-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
38 lines (36 loc) · 1.63 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
version: '3.9'
services:
theflashback:
image: ghcr.io/jimmylevell/theflashback/theflashback:latest
networks:
- traefik-public
secrets:
- SMTP_GMAIL_USER
- SMTP_GMAIL_PASSWORD
deploy:
replicas: 1
update_config:
parallelism: 1
delay: 10s
restart_policy:
condition: on-failure
labels:
- traefik.enable=true # enable traefik
- traefik.docker.network=traefik-public # put it in the same network as traefik
- traefik.constraint-label=traefik-public # assign the same label as traefik so it can be discovered
- traefik.http.routers.theflashback.rule=Host(`theflashback.ch`) # listen to port 80 for request to APP_DOMAIN (use together with the line below)
- traefik.http.routers.theflashback.entrypoints=http
- traefik.http.middlewares.theflashback.redirectscheme.scheme=https # redirect traffic to https
- traefik.http.middlewares.theflashback.redirectscheme.permanent=true # redirect traffic to https
- traefik.http.routers.theflashback-secured.rule=Host(`theflashback.ch`) # listen to port 443 for request to APP_DOMAIN (use together with the line below)
- traefik.http.routers.theflashback-secured.entrypoints=https
- traefik.http.routers.theflashback-secured.tls.certresolver=le # use the Let's Encrypt certificate we set up earlier
- traefik.http.services.theflashback-secured.loadbalancer.server.port=80 # ask Traefik to search for port service container
networks:
traefik-public:
external: true
secrets:
SMTP_GMAIL_USER:
external: true
SMTP_GMAIL_PASSWORD:
external: true