Add traefik nginx lables for static file serving.

This commit is contained in:
Stephan Porada 2020-12-07 15:34:18 +01:00
parent 44f3f01451
commit 807c49ff19

33
docker-compose.override.yml Executable file
View File

@ -0,0 +1,33 @@
version: '3.5'
networks:
reverse-proxy:
external:
name: reverse-proxy
services:
web:
networks:
- default
- reverse-proxy
labels:
- "traefik.enable=true"
- "traefik.http.routers.bundesdata.rule=Host(`bundesdata.${DOMAIN}`)"
- "traefik.http.routers.bundesdata.entrypoints=websecure"
- "traefik.http.routers.bundesdata.tls.certResolver=myresolver"
db:
networks:
- default
- reverse-proxy
nginx:
networks:
- default
- reverse-proxy
labels:
- "traefik.enable=true"
- "traefik.http.routers.static-http.entrypoints=websecure"
- "traefik.http.routers.static-http.rule=Host(`bundesdata.${DOMAIN}`) && PathPrefix(`/static`)"
- "traefik.http.routers.static-http.tls.certresolver=mytlschallenge"