Updated Database docker file to have Traefik Labels

This commit is contained in:
Luke Else 2022-11-03 16:18:40 +00:00
parent 86349c4b76
commit bd79b17c7f

View File

@ -46,6 +46,16 @@ services:
- traefik - traefik
environment: environment:
PMA_HOST: mysql PMA_HOST: mysql
labels:
## Expose phpMyAdmin Through Trefik ##
- "traefik.enable=true" # <== Enable traefik to proxy this container
- "traefik.http.routers.phpMyAdmin.rule=Host(`mysql.luke-else.co.uk`) || Host(`www.mysql.luke-else.co.uk`)"
- "traefik.http.routers.phpMyAdmin.entrypoints=http"
- "traefik.http.routers.phpMyAdmin.middlewares=redirect@file"
- "traefik.http.routers.phpMyAdmin-secured.rule=Host(`mysql.luke-else.co.uk`) || Host(`www.mysql.luke-else.co.uk`)"
- "traefik.http.routers.phpMyAdmin-secured.entrypoints=https"
- "traefik.http.routers.phpMyAdmin-secured.tls.certresolver=mytlschallenge"
restart: unless-stopped restart: unless-stopped
networks: networks: