services:
  app:
    build:
      context: ../..
      dockerfile: apps/library-go/Dockerfile
    ports:
      - "${PORT:-3000}:${PORT:-3000}"
    environment:
      - HOST=0.0.0.0
      - PORT=${PORT:-3000}
      - LIBRARY_DB_PATH=/data/library-go.sqlite
      - ADMIN_PASSWORD=${ADMIN_PASSWORD:-changeme}
      - GOOGLE_BOOKS_API_KEY=${GOOGLE_BOOKS_API_KEY:-}
      - BASE_URL=${BASE_URL:-http://localhost:${PORT:-3000}}
      - LIBRARY_DISPLAY_MODE=${LIBRARY_DISPLAY_MODE:-inline}
      - COOKIE_SECURE=${COOKIE_SECURE:-false}
    volumes:
      - library-go-data:/data
    restart: unless-stopped

volumes:
  library-go-data:
