add traefik middlewares

This commit is contained in:
BeauTroll
2026-01-06 10:48:34 +01:00
parent bcdacb3ed3
commit 32de88b3f3

View File

@@ -31,13 +31,20 @@ services:
- SEAFILE_ADMIN_PASSWORD=${SEAFILE_ADMIN_PASSWORD} # Specifies Seafile admin password, default is 'asecret'.
- SEAFILE_SERVER_LETSENCRYPT=${SEAFILE_SERVER_LETSENCRYPT} # Whether to use https or not.
- SEAFILE_SERVER_HOSTNAME=${SEAFILE_SERVER_HOSTNAME} # Specifies your host name if https is enabled.
- SEAFILE_SERVER_PROTOCOL=https # Protocol used to access Seafile (http or https)
- SERVICE_URL=https://${SEAFILE_SERVER_HOSTNAME} # Full URL to access Seafile
- FILE_SERVER_ROOT=https://${SEAFILE_SERVER_HOSTNAME}/seafhttp # URL for file server
labels:
- "traefik.enable=true"
- "traefik.http.routers.seafile.rule=Host(`${SEAFILE_SERVER_HOSTNAME}`)"
- "traefik.http.routers.seafile.entrypoints=websecure"
- "traefik.http.routers.seafile.tls=true"
- "traefik.http.routers.seafile.tls.certresolver=letsencrypt"
- "traefik.http.routers.seafile.middlewares=seafile-headers"
- "traefik.http.services.seafile.loadbalancer.server.port=80"
- "traefik.http.middlewares.seafile-headers.headers.customrequestheaders.X-Forwarded-Proto=https"
- "traefik.http.middlewares.seafile-headers.headers.customrequestheaders.X-Forwarded-For="
- "traefik.http.middlewares.seafile-headers.headers.customrequestheaders.X-Forwarded-Host=${SEAFILE_SERVER_HOSTNAME}"
depends_on:
- db
- memcached