Files
mathew/docker-compose.yml
Aran Roig 325394150d
All checks were successful
Build and Deploy Nuxt / build (push) Successful in 8s
Point production at the LAN MongoDB (192.168.1.7:27017)
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
2026-10-02 00:07:03 +02:00

33 lines
1.1 KiB
YAML

version: "3.9"
services:
nginx:
image: nginx:latest
ports:
- "3000:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- frontend
- backend
restart: always
frontend:
image: git.aranroig.com/syndria98/mathew-frontend:latest
restart: always
backend:
image: git.aranroig.com/syndria98/mathew-backend:latest
environment:
# Production MongoDB — the LAN database server, not a container of this
# stack and not the container's own 127.0.0.1 (where nothing listens).
# Development keeps localhost:27017 via backend/.env.
MONGO_URI: mongodb://192.168.1.7:27017/mathew
# Interpolated from /var/www/app/.env on the deploy host (never
# committed, never overwritten by the pipeline's scp). Create it once:
# echo "JWT_SECRET=$(openssl rand -hex 32)" >> /var/www/app/.env
# Left unset, the backend falls back to the dev key in the repo —
# anyone could then forge sessions against the public site.
JWT_SECRET: ${JWT_SECRET:-}
restart: always