Updated NextCloud container to use Traefik labels

This commit is contained in:
Luke Else 2022-11-03 16:26:54 +00:00
parent 566dd8c965
commit 463b9dc1f7

View File

@ -20,6 +20,16 @@ services:
- MYSQL_PASSWORD= - MYSQL_PASSWORD=
- MYSQL_DATABASE=nextcloud - MYSQL_DATABASE=nextcloud
- MYSQL_HOST=db - MYSQL_HOST=db
labels:
## Expose Nextcloud Through Trefik ##
- "traefik.enable=true" # <== Enable traefik to proxy this container
- "traefik.http.routers.nextcloud.rule=Host(`nextcloud.luke-else.co.uk`) || Host(`www.nextcloud.luke-else.co.uk`)"
- "traefik.http.routers.nextcloud.entrypoints=http"
- "traefik.http.routers.nextcloud.middlewares=redirect@file"
- "traefik.http.routers.nextcloud-secured.rule=Host(`nextcloud.luke-else.co.uk`) || Host(`www.nextcloud.luke-else.co.uk`)"
- "traefik.http.routers.nextcloud-secured.entrypoints=https"
- "traefik.http.routers.nextcloud-secured.tls.certresolver=mytlschallenge"
restart: unless-stopped restart: unless-stopped
db: db: