Production uses the network's database server instead of a mongo service
inside the stack (the compose-managed one never served the API). Dev is
unchanged: backend/.env keeps localhost:27017.
- docker-compose.yml: MONGO_URI=mongodb://192.168.1.7:27017/mathew; drop
the in-stack mongo service, its volume and the healthcheck gate
- deploy.yml: up -d --remove-orphans so yesterday's mongo container is
retired when the new compose lands
The backend image ships no .env (gitignored) and compose passed no env,
so MONGO_URI fell back to the container's own 127.0.0.1, the API died on
connect, and nginx answered 502 for every /api request.
- docker-compose.yml: mongo:7 service with a data volume; backend gets
MONGO_URI=mongodb://mongo:27017/mathew and waits on its healthcheck
- nginx.conf: resolve service names through Docker's DNS per request
(stale cached IPs 502 after every container recreate); match bare /api
too so it cannot loop through the frontend's SSR proxy