fix nginx media serve

This commit is contained in:
godd0t 2023-05-10 14:11:09 +02:00
parent 86d8ea3ad2
commit 4456137954

View File

@ -76,9 +76,12 @@ services:
- media_files:/usr/src/app/media
labels:
- "traefik.enable=true"
- "traefik.http.routers.${APP_NAME}-nginx.rule=Host(`${APP_HOST}`) && (PathPrefix(`/static`) || PathPrefix(`/media`))"
- "traefik.http.routers.${APP_NAME}-nginx.entrypoints=web"
- "traefik.http.services.${APP_NAME}-nginx.loadbalancer.server.port=80"
- "traefik.http.routers.${APP_NAME}-nginx-static.rule=Host(`${APP_HOST}`) && PathPrefix(`/static`)"
- "traefik.http.routers.${APP_NAME}-nginx-media.rule=Host(`${APP_HOST}`) && PathPrefix(`/media`)"
- "traefik.http.routers.${APP_NAME}-nginx-static.entrypoints=web"
- "traefik.http.routers.${APP_NAME}-nginx-media.entrypoints=web"
- "traefik.http.services.${APP_NAME}-nginx-static.loadbalancer.server.port=80"
- "traefik.http.services.${APP_NAME}-nginx-media.loadbalancer.server.port=80"
depends_on:
- backend