Updated all containers to bring inline with needed Traefik config

This commit is contained in:
2023-08-07 23:01:29 +01:00
parent 97b4dc6a66
commit 7a553128b1
5 changed files with 30 additions and 46 deletions

View File

@ -8,8 +8,6 @@ services:
container_name: mongoDB
volumes:
- ./mongo/:/data/db
networks:
- backend
ports:
- "27017:27017"
environment:
@ -23,12 +21,8 @@ services:
container_name: MySQL
volumes:
- ./mysql/:/var/lib/mysql
networks:
- backend
ports:
- "3306:3306"
depends_on:
- traefik
environment:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_DATABASE: test_db
@ -38,7 +32,7 @@ services:
image: "phpmyadmin/phpmyadmin:latest"
container_name: phpMyAdmin
networks:
- backend
- proxy
depends_on:
- mysql
- traefik
@ -47,15 +41,12 @@ services:
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"
- "traefik.http.services.phpmyadmin.loadbalancer.server.port=80"
- "traefik.http.routers.phpmyadmin.rule=Host(`mysql.luke-else.co.uk`) || Host(`www.mysql.luke-else.co.uk`)"
- "traefik.http.routers.phpmyadmin.entrypoints=websecure"
- "traefik.http.routers.phpmyadmin.tls.certresolver=myresolver"
restart: unless-stopped
networks:
backend:
proxy:
external: true