Skip to content

Commit

Permalink
ad
Browse files Browse the repository at this point in the history
  • Loading branch information
Bit-Barron committed Nov 2, 2024
1 parent 1374b9b commit 38d0060
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
19 changes: 4 additions & 15 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,14 @@ services:
- '3000:3000' # Main app port
labels:
- 'traefik.enable=true'
# Main application router
- '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'

# Socket.IO specific router
- 'traefik.http.routers.youtubepedia-socket.rule=Host(`youtubepedia.barron.agency`) && PathPrefix(`/socket.io`)'
- 'traefik.http.routers.youtubepedia-socket.entrypoints=websecure'
- 'traefik.http.routers.youtubepedia-socket.service=youtubepedia-socket-service'
- 'traefik.http.routers.youtubepedia-socket.tls.certresolver=letsencrypt'

# Socket.IO service definition
- 'traefik.http.services.youtubepedia-socket-service.loadbalancer.server.port=3001'

# WebSocket middleware
- 'traefik.http.middlewares.ws-middleware.headers.customrequestheaders.Connection=Upgrade'
- 'traefik.http.middlewares.ws-middleware.headers.customrequestheaders.Upgrade=websocket'
- 'traefik.http.routers.youtubepedia-socket.middlewares=ws-middleware'
# WebSocket Middleware
- 'traefik.http.middlewares.youtubepedia-ws.headers.customrequestheaders.Connection=Upgrade'
- 'traefik.http.middlewares.youtubepedia-ws.headers.customrequestheaders.Upgrade=websocket'
- 'traefik.http.routers.youtubepedia.middlewares=youtubepedia-ws'

networks:
proxy:
Expand Down
1 change: 0 additions & 1 deletion src/lib/socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export const initSocket = (userId: string): Socket | null => {
reconnectionAttempts: 5,
path: '/socket.io' // Muss mit Server-Path übereinstimmen
});


socket.on('connect', () => {
console.log('Connected to socket server');
Expand Down

0 comments on commit 38d0060

Please sign in to comment.