Wire the frontend into the deploy stack and CI
Compose gains a frontend service; Caddy now routes / to frontend:3000 (keeping /api/* and /health* on the backend). CI builds and pushes a frontend image alongside the backend. Verified end-to-end on the deploy target: / serves the app, /api and /health still resolve through Caddy. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Justin Paul <justin@jpaul.me>
This commit is contained in:
+2
-5
@@ -15,11 +15,8 @@
|
||||
reverse_proxy backend:8000
|
||||
}
|
||||
|
||||
# Frontend (Next.js) — not yet deployed in Phase 0. Uncomment when it lands.
|
||||
# handle {
|
||||
# reverse_proxy frontend:3000
|
||||
# }
|
||||
# Everything else -> the Next.js frontend.
|
||||
handle {
|
||||
respond "Provenance — Phase 0. Backend health at /health; frontend not yet deployed." 200
|
||||
reverse_proxy frontend:3000
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +57,16 @@ services:
|
||||
start_period: 20s
|
||||
restart: unless-stopped
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ../frontend
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
depends_on:
|
||||
- backend
|
||||
restart: unless-stopped
|
||||
|
||||
caddy:
|
||||
image: caddy:2
|
||||
ports:
|
||||
@@ -72,6 +82,7 @@ services:
|
||||
- caddyconfig:/config
|
||||
depends_on:
|
||||
- backend
|
||||
- frontend
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
|
||||
Reference in New Issue
Block a user