Skip to content

compose: WSS on API host via Traefik header routing#2

Closed
matheusfillipe wants to merge 2 commits into
mainfrom
wss-on-api-host
Closed

compose: WSS on API host via Traefik header routing#2
matheusfillipe wants to merge 2 commits into
mainfrom
wss-on-api-host

Conversation

@matheusfillipe
Copy link
Copy Markdown
Contributor

@matheusfillipe matheusfillipe commented May 18, 2026

Lets web clients connect to wss:// instead of needing a separate ws subdomain. Traefik priority 100 + HeaderRegexp(Upgrade,websocket) wins for WS upgrades; everything else continues to obby-api.

Uses SERVICE_FQDN_OBBY_API on Coolify (substituted before label escape), falls back to API_FQDN env for raw docker-compose users.

Summary by CodeRabbit

  • Chores
    • Enhanced service routing configuration with dedicated WebSocket support, implementing HTTPS/TLS encryption and automatic LetsEncrypt certificate management for improved API connection security and reliability.
    • Simplified Docker Compose service declarations by removing redundant container name configurations.

Review Change Stack

Route WSS upgrades on the API hostname to obbyircd:8080 with priority
100; everything else on the same host falls through to obby-api.
Lets a web client point at wss://<api-host> instead of needing a
separate ws subdomain.

Uses SERVICE_FQDN_OBBY_API on Coolify (substituted before label
escaping); falls back to API_FQDN for raw docker-compose users.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 18, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

The compose.yaml file is updated to add dedicated websocket routing for the IRC service via Traefik labels and remove explicit container name fields from both the IRC and web frontend services. The IRC service routing now matches websocket upgrade requests on the API host and routes to port 8080 with HTTPS and LetsEncrypt certificate resolution.

Changes

Docker Compose Configuration Update

Layer / File(s) Summary
IRC service websocket routing and configuration
compose.yaml
obbyircd service removes its container_name field. Traefik routing is restructured: the prior generic obbyircd router (matching host and backend port) is replaced with a dedicated obbyircd-ws websocket router that matches websocket upgrade headers, routes to the API host on port 8080, and includes explicit HTTPS entrypoint, TLS settings, LetsEncrypt certresolver, and higher priority.
Web service configuration cleanup
compose.yaml
obby (web frontend) service removes its container_name field; existing restart policy, profiles, expose configuration, and Traefik routing labels remain unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A hop through the routing, websockets take flight,
Container names vanish, the config burns bright,
Traefik's new dance, with headers so keen,
Port eighty-eighty leads to eighty-eighty-oh-oh—
The cleanest compose that we've ever seen! 🎯✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: enabling WebSocket Secure (WSS) connections on the API host using Traefik header-based routing, which is the primary objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch wss-on-api-host

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@matheusfillipe
Copy link
Copy Markdown
Contributor Author

Closing — wiring belongs in Coolify per-app, not in the generic compose source.

@matheusfillipe matheusfillipe deleted the wss-on-api-host branch May 18, 2026 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant