Updated websites containers to use Traefik labels

This commit is contained in:
Luke Else 2022-11-03 16:29:15 +00:00
parent 463b9dc1f7
commit 661cebcec0

View File

@ -10,6 +10,16 @@ services:
- ./luke-else.co.uk/:/var/www/html - ./luke-else.co.uk/:/var/www/html
depends_on: depends_on:
- traefik - traefik
labels:
## Expose luke-else Through Trefik ##
- "traefik.enable=true" # <== Enable traefik to proxy this container
- "traefik.http.routers.luke-else.rule=Host(`luke-else.co.uk`) || Host(`www.luke-else.co.uk`)"
- "traefik.http.routers.luke-else.entrypoints=http"
- "traefik.http.routers.luke-else.middlewares=redirect@file"
- "traefik.http.routers.luke-else-secured.rule=Host(`luke-else.co.uk`) || Host(`www.luke-else.co.uk`)"
- "traefik.http.routers.luke-else-secured.entrypoints=https"
- "traefik.http.routers.luke-else-secured.tls.certresolver=mytlschallenge"
restart: unless-stopped restart: unless-stopped
snexo.co.uk: snexo.co.uk:
@ -19,6 +29,16 @@ services:
- ./snexo.co.uk/:/var/www/html - ./snexo.co.uk/:/var/www/html
depends_on: depends_on:
- traefik - traefik
labels:
## Expose Snexo Through Trefik ##
- "traefik.enable=true" # <== Enable traefik to proxy this container
- "traefik.http.routers.snexo.rule=Host(`snexo.luke-else.co.uk`) || Host(`www.snexo.luke-else.co.uk`)"
- "traefik.http.routers.snexo.entrypoints=http"
- "traefik.http.routers.snexo.middlewares=redirect@file"
- "traefik.http.routers.snexo-secured.rule=Host(`snexo.luke-else.co.uk`) || Host(`www.snexo.luke-else.co.uk`)"
- "traefik.http.routers.snexo-secured.entrypoints=https"
- "traefik.http.routers.snexo-secured.tls.certresolver=mytlschallenge"
restart: unless-stopped restart: unless-stopped
networks: networks: