services: mongo: image: mongo:7 restart: unless-stopped volumes: - mongo_data:/data/db # No external port — reachable only by the api container via the default network. api: # In prod: pull the pre-built image from the gitea-hosted registry. # In dev: `docker compose up --build` uses the local Dockerfile below. image: gitea.yakenator.io/yakenator/jimi-gallery:latest build: context: . dockerfile: backend/Dockerfile restart: unless-stopped ports: # Bound to loopback so nginx on the host is the only gateway. # Host port 5891 is uncommon to avoid collisions with other dev servers. - "127.0.0.1:5891:8000" environment: - MONGO_URL=mongodb://mongo:27017 - DB_NAME=jimi_gallery - ADMIN_PASSWORD=${ADMIN_PASSWORD:-admin} - JWT_SECRET=${JWT_SECRET:-dev-secret-change-me} - STATIC_DIR=/static depends_on: - mongo volumes: mongo_data: