# Sample Room — Managed App Services (Fixture Invoicing) # # Runs backend + frontend + postgres on the shared sample_network, # so soleprint + nginx can wrap them from cfg/sample/soleprint/. # # Usage (from gen/sample/sample/): # docker compose up -d name: ${DEPLOYMENT_NAME} services: db: image: postgres:16-alpine container_name: ${DEPLOYMENT_NAME}_db environment: POSTGRES_DB: ${POSTGRES_DB} POSTGRES_USER: ${POSTGRES_USER} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} volumes: - pgdata:/var/lib/postgresql/data ports: - "${DB_PORT}:5432" healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"] interval: 5s timeout: 3s retries: 10 networks: - default backend: build: context: ./backend container_name: ${DEPLOYMENT_NAME}_backend environment: DB_HOST: db DB_PORT: 5432 DB_NAME: ${POSTGRES_DB} DB_USER: ${POSTGRES_USER} DB_PASSWORD: ${POSTGRES_PASSWORD} SEED_ON_START: "true" ports: - "${BACKEND_PORT}:8000" depends_on: db: condition: service_healthy networks: - default frontend: build: context: ./frontend container_name: ${DEPLOYMENT_NAME}_frontend environment: # Browser hits /api/ via nginx, so leave blank to use same-origin VITE_API_URL: "" ports: - "${FRONTEND_PORT}:5173" depends_on: - backend volumes: - ./frontend/src:/app/src - ./frontend/index.html:/app/index.html - ./frontend/vite.config.js:/app/vite.config.js networks: - default volumes: pgdata: networks: default: external: true name: ${NETWORK_NAME}