changed pathprefix to file type matching
This commit is contained in:
@@ -3,7 +3,7 @@ services:
|
|||||||
media:
|
media:
|
||||||
image: nginx:1.27-alpine
|
image: nginx:1.27-alpine
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
container_name: mindboost-media-server
|
||||||
volumes:
|
volumes:
|
||||||
- ./nginx/html:/usr/share/nginx/html:ro
|
- ./nginx/html:/usr/share/nginx/html:ro
|
||||||
- ./nginx/conf.d:/etc/nginx/conf.d:ro
|
- ./nginx/conf.d:/etc/nginx/conf.d:ro
|
||||||
@@ -13,7 +13,7 @@ services:
|
|||||||
- traefik.enable=true
|
- traefik.enable=true
|
||||||
|
|
||||||
# Route: https://b.mindboost.team/media (optionally with /anything/after/that)
|
# Route: https://b.mindboost.team/media (optionally with /anything/after/that)
|
||||||
- traefik.http.routers.media.rule=Host(`b.mindboost.team`) && PathPrefix(`/media`)
|
- traefik.http.routers.media.rule=Host(`b.mindboost.team`) && PathRegexp(`\.(mp3|aac|m4a|ogg|aac|opus|flac|wav)$`)
|
||||||
|
|
||||||
# Strip /media from the request *before* it reaches Nginx,
|
# Strip /media from the request *before* it reaches Nginx,
|
||||||
# so Nginx still serves /index.html, /css/site.css, etc.
|
# so Nginx still serves /index.html, /css/site.css, etc.
|
||||||
@@ -22,13 +22,13 @@ services:
|
|||||||
|
|
||||||
# TLS via the proxys “websecure” entrypoint
|
# TLS via the proxys “websecure” entrypoint
|
||||||
- traefik.http.routers.media.entrypoints=websecure
|
- traefik.http.routers.media.entrypoints=websecure
|
||||||
- traefik.http.routers.media.tls.certresolver=letsencrypt
|
- traefik.http.routers.media.tls.certresolver=http_resolver
|
||||||
|
|
||||||
# Upstream container port
|
# Upstream container port
|
||||||
- traefik.http.services.media.loadbalancer.server.port=80
|
- traefik.http.services.media.loadbalancer.server.port=80
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
- swarmproxy
|
- proxy
|
||||||
networks:
|
networks:
|
||||||
swarmproxy:
|
proxy:
|
||||||
external: true
|
external: true
|
Reference in New Issue
Block a user