Current config:
services:
traefik:
image: traefik:latest
container_name: traefik
restart: unless-stopped
networks:
- web
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./traefik/traefik.yml:/traefik.yml:ro
- ./traefik/acme.json:/acme.json
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik.rule=Host(`traefik.x.x`)"
- "traefik.http.routers.traefik.entrypoints=websecure"
- "traefik.http.routers.traefik.service=api@internal"
- "traefik.http.routers.traefik.tls.certresolver=letsencrypt"
- "traefik.http.services.traefik.loadbalancer.server.port=8080"
chibisafe:
image: chibisafe/chibisafe:latest
environment:
- BASE_API_URL=http://chibisafe_server:8000
networks:
- web
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.chibisafe.rule=Host(`img.x.x`)"
- "traefik.http.routers.chibisafe.entrypoints=websecure"
- "traefik.http.routers.chibisafe.tls.certresolver=letsencrypt"
- "traefik.http.services.chibisafe.loadbalancer.server.port=8001"
chibisafe_server:
image: chibisafe/chibisafe-server:latest
volumes:
- /mnt/HC_Volume_102355557/chibisafe/database:/app/database:rw
- /mnt/HC_Volume_102355557/chibisafe/uploads:/app/uploads:rw
- /mnt/HC_Volume_102355557/chibisafe/logs:/app/logs:rw
networks:
- web
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.chibisafe-api.rule=Host(`img.x.x`) && Path(`/api`)"
- "traefik.http.routers.chibisafe-api.entrypoints=websecure"
- "traefik.http.routers.chibisafe-api.tls.certresolver=letsencrypt"
- "traefik.http.services.chibisafe-api.loadbalancer.server.port=8000"
sfs:
image: halverneus/static-file-server:v1.8.3
volumes:
- "/mnt/HC_Volume_102355557/chibisafe/uploads:/web"
networks:
- web
labels:
- "traefik.enable=true"
- "traefik.http.routers.sfs.rule=Host(`img.x.x`) && Path(`/`)"
- "traefik.http.routers.sfs.entrypoints=websecure"
- "traefik.http.routers.sfs.tls.certresolver=letsencrypt"
- "traefik.http.services.sfs.loadbalancer.server.port=8080"
networks:
web:
external: true
Now, for sfs my previous config was on nginx with virtual path with this check:
~*\.(png|jpe?g|gif|webp|mp4|webm|pdf|zip|txt|json|svg|ico|ogg|mp3|wav)$
How can i do the same with traefik on sfs ?