The two per-run limiters in main.py now read from the environment with their current hardcoded values as defaults. Lets us tune cadence (e.g. 200 → 500 newly-tagged files per click) without rebuilding the image — edit .env and `docker compose up -d --force-recreate api`. docker-compose.yml threads both vars into the api container. .env.example documents them with empty defaults. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
71 lines
4.1 KiB
Text
71 lines
4.1 KiB
Text
# Copy to `.env` and fill in. `.env` is gitignored.
|
|
|
|
# ── Gemini ─────────────────────────────────────────────────────────────────────
|
|
GEMINI_API_KEY=your_gemini_api_key_here
|
|
|
|
# ── Box ────────────────────────────────────────────────────────────────────────
|
|
# Comma-separated list of Box folder IDs to walk recursively. The Box JWT
|
|
# service account must have access to every folder listed. Files surfaced
|
|
# under more than one root are deduped by file_id. Empty → falls back to
|
|
# the hardcoded default in main.py.
|
|
# Example: BOX_FOLDER_IDS=380274488839,123456789012
|
|
BOX_FOLDER_IDS=
|
|
|
|
# Per-run caps. Empty → defaults in main.py (200 newly-tagged files, 14400 s = 4h).
|
|
# Bump these when you're confident in Gemini quota / Box throughput headroom.
|
|
MAX_FILES_PER_RUN=
|
|
MAX_RUN_DURATION_SECS=
|
|
|
|
# ── Postgres ───────────────────────────────────────────────────────────────────
|
|
POSTGRES_USER=marriott
|
|
POSTGRES_PASSWORD=change_me
|
|
POSTGRES_DB=marriott_tagging
|
|
# Host port to publish Postgres on (bound to 127.0.0.1 only — never reachable
|
|
# from outside the host). Change if 5432 is already taken locally. On the dev
|
|
# server `deploy/deploy.sh` auto-picks a free port from 5435-5499 and persists
|
|
# the choice back to .env.
|
|
POSTGRES_HOST_PORT=5432
|
|
|
|
# ── FastAPI backend ────────────────────────────────────────────────────────────
|
|
# Host port for the API (bound to 127.0.0.1; Apache reverse-proxies to it).
|
|
# On the dev server `deploy/deploy.sh` auto-picks from 8003-8099 and persists.
|
|
MARRIOTT_API_PORT=8004
|
|
# Comma-separated origins for CORS — only needed when running Vite dev server
|
|
# against a Dockerised API. Leave empty in production (Apache same-origin).
|
|
# Example: http://localhost:5173
|
|
CORS_ORIGINS=
|
|
|
|
# ── Auth (Azure AD / Entra ID) ────────────────────────────────────────────────
|
|
# Master switch. true = skip MSAL entirely, every request is the DEV_AUTH_* user.
|
|
# Set to false once tenant/client IDs are filled in to enforce SSO.
|
|
DEV_AUTH_BYPASS=true
|
|
DEV_AUTH_NAME=Dev User
|
|
DEV_AUTH_EMAIL=dev@oliver.agency
|
|
# Fill from an existing Oliver Azure AD app registration. The same client ID
|
|
# goes in both the backend (token validation) and the frontend (MSAL login).
|
|
AZURE_TENANT_ID=
|
|
AZURE_CLIENT_ID=
|
|
# Comma-separated list of admin emails. Only these accounts can click
|
|
# "Run now" or "Backfill from Box". Everyone else gets a read-only UI.
|
|
# Example: ADMIN_EMAILS=alice@oliver.agency,bob@oliver.agency
|
|
ADMIN_EMAILS=
|
|
# When DEV_AUTH_BYPASS=true the dev user is admin by default. Flip to false
|
|
# to test the read-only UI without enabling SSO.
|
|
DEV_AUTH_IS_ADMIN=true
|
|
# Frontend mirrors — Vite reads VITE_* at build time and bakes them into dist.
|
|
# Keep these in sync with the values above.
|
|
VITE_DEV_AUTH_BYPASS=true
|
|
VITE_AZURE_TENANT_ID=
|
|
VITE_AZURE_CLIENT_ID=
|
|
# Public base URL for the SPA — used as the MSAL redirect URI root.
|
|
# Local dev: http://localhost:5173 ; prod: https://optical-dev.oliver.solutions/marriott-tagging
|
|
VITE_PUBLIC_BASE=http://localhost:5173
|
|
|
|
# ── Scheduler ──────────────────────────────────────────────────────────────────
|
|
# Cron expression for the recurring tagging pass. Default = daily at 02:00.
|
|
SCHEDULE_CRON=0 2 * * *
|
|
# Set to 1 to also fire one pass immediately when the container starts (useful
|
|
# for verification / first run after a redeploy).
|
|
RUN_AT_STARTUP=0
|
|
# Timezone the cron expression is interpreted in (e.g. Europe/London, UTC).
|
|
TZ=UTC
|