mirror of
https://github.com/Dokploy/templates.git
synced 2026-07-10 00:15:28 +02:00
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 <noreply@anthropic.com>
64 lines
1.8 KiB
YAML
64 lines
1.8 KiB
YAML
name: multica
|
|
|
|
services:
|
|
postgres:
|
|
image: pgvector/pgvector:pg17
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB}
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
backend:
|
|
build:
|
|
context: "https://github.com/multica-ai/multica.git#main"
|
|
dockerfile: Dockerfile
|
|
restart: unless-stopped
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
volumes:
|
|
- backend_uploads:/app/data/uploads
|
|
environment:
|
|
DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}?sslmode=disable
|
|
PORT: "8080"
|
|
JWT_SECRET: ${JWT_SECRET}
|
|
FRONTEND_ORIGIN: ${FRONTEND_ORIGIN}
|
|
ALLOWED_ORIGINS: ${ALLOWED_ORIGINS}
|
|
MULTICA_APP_URL: ${MULTICA_APP_URL}
|
|
RESEND_API_KEY: ${RESEND_API_KEY}
|
|
RESEND_FROM_EMAIL: ${RESEND_FROM_EMAIL}
|
|
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
|
|
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET}
|
|
GOOGLE_REDIRECT_URI: ${GOOGLE_REDIRECT_URI}
|
|
COOKIE_DOMAIN: ${COOKIE_DOMAIN}
|
|
S3_BUCKET: ${S3_BUCKET}
|
|
S3_REGION: ${S3_REGION}
|
|
CLOUDFRONT_DOMAIN: ${CLOUDFRONT_DOMAIN}
|
|
CLOUDFRONT_KEY_PAIR_ID: ${CLOUDFRONT_KEY_PAIR_ID}
|
|
CLOUDFRONT_PRIVATE_KEY: ${CLOUDFRONT_PRIVATE_KEY}
|
|
|
|
frontend:
|
|
build:
|
|
context: "https://github.com/multica-ai/multica.git#main"
|
|
dockerfile: Dockerfile.web
|
|
args:
|
|
REMOTE_API_URL: http://backend:8080
|
|
NEXT_PUBLIC_GOOGLE_CLIENT_ID: ${NEXT_PUBLIC_GOOGLE_CLIENT_ID}
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- backend
|
|
environment:
|
|
HOSTNAME: "0.0.0.0"
|
|
|
|
volumes:
|
|
pgdata:
|
|
backend_uploads:
|