# SubmitStream — form-submission backend (FastAPI).
# Build/redeploy:  srv-gw deploy --project submitstream --build
# Logs:            srv-gw logs --project submitstream

services:
  app:
    build: .
    container_name: ${PROJECT_NAME}-app
    restart: unless-stopped
    network_mode: bridge

    # DO NOT CHANGE host IP/port — managed by gateway. Internal app port is 8000.
    ports:
      - "172.17.0.1:${PORT}:8000"

    volumes:
      - ./data:/data        # SQLite db + debug log (persistent)
      - ./app:/app          # live app code (edit + restart, no rebuild needed)

    env_file:
      - .env
      - .bw-auth.env        # BW_CLIENT_ID + BW_CLIENT_SECRET (gateway-written, 600)

    mem_limit: 512m
    cpus: 1.0
