`make dev-frontend` serves the SPA from localhost:5173 and talks to the stack's backend, which refused it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H7LwYgJfpkbLCTeiAf8U4A
52 lines
1.5 KiB
YAML
52 lines
1.5 KiB
YAML
# Integrated local stack — layered on top of compose.yml + compose.dev.yml by
|
|
# the root `make dev`. Reattaches this stack's Traefik to the shared external
|
|
# `proxy` network so it also routes the website stack's containers, and serves
|
|
# everything over plain http on *.${DOMAIN} (default *.localhost).
|
|
|
|
# Everything here is reachable through Traefik on *.${DOMAIN}, so the host ports
|
|
# compose.dev.yml publishes are dropped: they add nothing and make the whole
|
|
# stack fail to start whenever something else on the host already holds one.
|
|
services:
|
|
|
|
proxy:
|
|
networks:
|
|
- proxy
|
|
- default
|
|
ports: !override
|
|
- "80:80"
|
|
|
|
db:
|
|
ports: !reset []
|
|
|
|
adminer:
|
|
ports: !reset []
|
|
|
|
mailcatcher:
|
|
ports: !reset []
|
|
|
|
backend:
|
|
ports: !reset []
|
|
environment:
|
|
- ENVIRONMENT=local
|
|
- FRONTEND_HOST=http://app.${DOMAIN:-localhost}
|
|
# Last entry: the standalone Vite dev server (`make dev-frontend`), which
|
|
# talks to this backend rather than running one of its own.
|
|
- BACKEND_CORS_ORIGINS=http://${DOMAIN:-localhost},http://app.${DOMAIN:-localhost},http://localhost:5173
|
|
|
|
prestart:
|
|
environment:
|
|
- ENVIRONMENT=local
|
|
- FRONTEND_HOST=http://app.${DOMAIN:-localhost}
|
|
|
|
frontend:
|
|
ports: !reset []
|
|
build:
|
|
args:
|
|
- VITE_API_URL=http://api.${DOMAIN:-localhost}
|
|
- NODE_ENV=development
|
|
|
|
networks:
|
|
# Shared with the website stack; created by the root scripts/setup.sh.
|
|
proxy:
|
|
external: true
|