Skip to content

Commit

Permalink
vb
Browse files Browse the repository at this point in the history
  • Loading branch information
Bit-Barron committed Nov 2, 2024
1 parent 56bd5c1 commit 9c4bd21
Showing 1 changed file with 31 additions and 9 deletions.
40 changes: 31 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# docker-compose.yml
services:
youtubepedia:
container_name: youtubepedia
Expand All @@ -20,15 +21,36 @@ services:
networks:
- proxy
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.youtubepedia.rule=Host(`youtubepedia.barron.agency`)'
- 'traefik.http.routers.youtubepedia.entrypoints=websecure'
- 'traefik.http.routers.youtubepedia.tls.certresolver=letsencrypt'
- 'traefik.http.services.youtubepedia.loadbalancer.server.port=3000'
- 'traefik.http.middlewares.youtubepedia-ws.headers.customrequestheaders.Upgrade=websocket'
- 'traefik.http.middlewares.youtubepedia-ws.headers.customrequestheaders.Connection=Upgrade'
- 'traefik.http.routers.youtubepedia.middlewares=youtubepedia-ws'
# Basic Traefik configuration
- "traefik.enable=true"
- "traefik.docker.network=proxy"

# HTTP Router configuration
- "traefik.http.routers.youtubepedia.rule=Host(`youtubepedia.barron.agency`)"
- "traefik.http.routers.youtubepedia.entrypoints=websecure"
- "traefik.http.routers.youtubepedia.tls.certresolver=letsencrypt"

# Service configuration
- "traefik.http.services.youtubepedia.loadbalancer.server.port=3000"

# Middleware configurations
- "traefik.http.middlewares.youtubepedia-ws.headers.customrequestheaders.Upgrade=websocket"
- "traefik.http.middlewares.youtubepedia-ws.headers.customrequestheaders.Connection=Upgrade"
- "traefik.http.routers.youtubepedia.middlewares=youtubepedia-ws,security-headers"

# Additional security headers
- "traefik.http.middlewares.security-headers.headers.sslredirect=true"
- "traefik.http.middlewares.security-headers.headers.stsSeconds=31536000"
- "traefik.http.middlewares.security-headers.headers.forceSTSHeader=true"

# Socket.IO specific configuration
- "traefik.http.routers.youtubepedia-socket.rule=Host(`youtubepedia.barron.agency`) && PathPrefix(`/socket.io`)"
- "traefik.http.routers.youtubepedia-socket.service=youtubepedia-socket"
- "traefik.http.services.youtubepedia-socket.loadbalancer.server.port=3001"
- "traefik.http.routers.youtubepedia-socket.entrypoints=websecure"
- "traefik.http.routers.youtubepedia-socket.tls.certresolver=letsencrypt"
- "traefik.http.routers.youtubepedia-socket.middlewares=youtubepedia-ws"

networks:
proxy:
external: true
external: true

0 comments on commit 9c4bd21

Please sign in to comment.