From 0ada7ae5f25630dbfeecf472aff776aab6b01b93 Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Wed, 8 Jul 2026 02:50:24 -0600 Subject: [PATCH] fix: remove public backend domain that always returned 404 The Multica backend is an API-only chi server with no route registered at "/", so the generated backend domain (path "/") permanently answered HTTP 404 even though the container was healthy. The web frontend already proxies /api/*, /ws, /auth/* and /uploads/* to http://backend:8080 via Next.js rewrites, and when NEXT_PUBLIC_WS_URL is unset the browser derives the WebSocket URL from the page origin, so the backend never needs to be exposed publicly. - drop the backend [[config.domains]] entry and api_domain variable - drop NEXT_PUBLIC_WS_URL so the WS URL falls back to the page origin and goes through the frontend's /ws rewrite - remove ephemeral host port publications (ports: "8080"/"3000"); Traefik reaches the containers over the docker network Verified on a Dokploy instance: deploy done, frontend / -> 200 and backend reachable through the proxy (/api/config -> 200). Co-Authored-By: Claude Fable 5 --- blueprints/multica/docker-compose.yml | 5 ----- blueprints/multica/template.toml | 8 -------- 2 files changed, 13 deletions(-) diff --git a/blueprints/multica/docker-compose.yml b/blueprints/multica/docker-compose.yml index d0ba06bb..cc3e799f 100644 --- a/blueprints/multica/docker-compose.yml +++ b/blueprints/multica/docker-compose.yml @@ -24,8 +24,6 @@ services: depends_on: postgres: condition: service_healthy - ports: - - "8080" volumes: - backend_uploads:/app/data/uploads environment: @@ -53,13 +51,10 @@ services: dockerfile: Dockerfile.web args: REMOTE_API_URL: http://backend:8080 - NEXT_PUBLIC_WS_URL: ${NEXT_PUBLIC_WS_URL} NEXT_PUBLIC_GOOGLE_CLIENT_ID: ${NEXT_PUBLIC_GOOGLE_CLIENT_ID} restart: unless-stopped depends_on: - backend - ports: - - "3000" environment: HOSTNAME: "0.0.0.0" diff --git a/blueprints/multica/template.toml b/blueprints/multica/template.toml index 9206c814..04b6ceab 100644 --- a/blueprints/multica/template.toml +++ b/blueprints/multica/template.toml @@ -1,6 +1,5 @@ [variables] app_domain = "${domain}" -api_domain = "${domain}" jwt_secret = "${password:64}" postgres_password = "${password:32}" @@ -11,12 +10,6 @@ port = 3000 host = "${app_domain}" path = "/" -[[config.domains]] -serviceName = "backend" -port = 8080 -host = "${api_domain}" -path = "/" - [config.env] POSTGRES_DB = "multica" POSTGRES_USER = "multica" @@ -25,7 +18,6 @@ JWT_SECRET = "${jwt_secret}" FRONTEND_ORIGIN = "https://${app_domain}" ALLOWED_ORIGINS = "https://${app_domain}" MULTICA_APP_URL = "https://${app_domain}" -NEXT_PUBLIC_WS_URL = "wss://${api_domain}/ws" RESEND_API_KEY = "" RESEND_FROM_EMAIL = "noreply@multica.ai" GOOGLE_CLIENT_ID = ""