Repository navigation
Commit c86ebdf
fix(deploy): align containers with same-origin API proxy; make backend image runnable
- docker-compose: the frontend's Next server now proxies /api/v1/* to the
backend, so point BACKEND_ORIGIN at the `backend` service (http://backend:8000),
not localhost — otherwise the proxy hits the frontend container itself. Fixes
`docker-compose up --build` after the proxy change. Drop the now-unused
NEXT_PUBLIC_API_URL.
- frontend/Dockerfile: build arg NEXT_PUBLIC_API_URL → BACKEND_ORIGIN (rewrites()
is evaluated at build time).
- backend/Dockerfile: add a default CMD honoring $PORT so the image starts on
hosted platforms (Render/Railway/Fly/K8s); compose still overrides it.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 905907d commit c86ebdf
3 files changed
Lines changed: 16 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
51 | 55 | | |
52 | 56 | | |
53 | 57 | | |
54 | 58 | | |
55 | | - | |
| 59 | + | |
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
| |||
0 commit comments