version: "3.8"

services:
  queuenorth:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: queuenorth-website
    ports:
      - "3001:3001"
    volumes:
      # Persist SQLite database between runs using named volume
      # This avoids host permission issues - Docker manages ownership automatically
      - queuenorth-db:/app/db:rw
      # Persist logs using named volume
      - queuenorth-logs:/app/logs:rw
    environment:
      - NODE_ENV=production
      - SERVER_PORT=3001
      - RATE_LIMIT_PER_MINUTE=5
      - CORS_ORIGIN=https://queuenorth.com
      - LOG_LEVEL=info
      - ZOHO_ENABLED=false
      - ZOHO_API_DOMAIN=https://www.zohoapis.com
      - ZOHO_CLIENT_ID=
      - ZOHO_CLIENT_SECRET=
      - ZOHO_REFRESH_TOKEN=
      - ZOHO_REDIRECT_URI=
    restart: unless-stopped
    # Container runs as non-root user (UID 1001) for security

volumes:
  queuenorth-db:
  queuenorth-logs:
