services: bridge: build: . # Bind to localhost only — Nginx proxies from outside ports: - "127.0.0.1:${PORT:-3002}:${PORT:-3002}" env_file: .env depends_on: mongo: condition: service_healthy restart: unless-stopped logging: driver: json-file options: max-size: "10m" max-file: "3" mongo: image: mongo:7 # No ports exposed — only reachable by bridge on the internal network volumes: - mongo-data:/data/db restart: unless-stopped healthcheck: test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"] interval: 10s timeout: 5s retries: 5 start_period: 20s volumes: mongo-data: