diff --git a/compose.yaml b/compose.yaml index 2cb65be..d95c6b5 100644 --- a/compose.yaml +++ b/compose.yaml @@ -9,7 +9,6 @@ services: obbyircd: image: ${OBBYIRCD_IMAGE:-mattfly/obbyircd:latest} - container_name: obbyircd restart: unless-stopped expose: - "8080" @@ -37,13 +36,19 @@ services: start_period: 30s labels: - traefik.enable=true + # IRC websocket on its own subdomain. - traefik.http.routers.obbyircd.rule=Host(`${IRC_FQDN}`) - traefik.http.routers.obbyircd.tls=true - traefik.http.services.obbyircd.loadbalancer.server.port=8080 + # IRC websocket on the API host (WSS upgrade requests only). + # Longer rule + priority 100 wins over obby-api's catch-all. + - traefik.http.routers.obbyircd-ws.rule=Host(`${API_FQDN}`) && HeaderRegexp(`Upgrade`,`websocket`) + - traefik.http.routers.obbyircd-ws.tls=true + - traefik.http.routers.obbyircd-ws.priority=100 + - traefik.http.services.obbyircd-ws.loadbalancer.server.port=8080 obby-api: image: ${OBBY_API_IMAGE:-mattfly/obby-api:latest} - container_name: obby-api restart: unless-stopped depends_on: obbyircd: @@ -81,7 +86,6 @@ services: obby: image: ${OBBY_WEB_IMAGE:-mattfly/obby:latest} - container_name: obby-web restart: unless-stopped profiles: ["frontend"] expose: