APP_ENV=development
API_PORT=8080
API_SHUTDOWN_TIMEOUT=10s
DATABASE_URL=postgres://productier:productier@localhost:5432/productier?sslmode=disable
# Optional safety override for non-development runs without DATABASE_URL.
# Keep unset for normal production/staging deployments.
# ALLOW_INMEMORY_STORE=false
BETTER_AUTH_SECRET=replace-me-with-a-long-random-secret
MAIL_ENCRYPTION_KEY=replace-me-with-a-dedicated-mail-secret
FILE_STORAGE_DIR=./data/uploads
FILE_STORAGE_PROVIDER=local

# Optional S3-compatible storage (RustFS example) when FILE_STORAGE_PROVIDER=s3
# S3_ENDPOINT=http://localhost:9000
# S3_REGION=us-east-1
# S3_BUCKET=productier
# S3_ACCESS_KEY=rustfsadmin
# S3_SECRET_KEY=rustfsadmin
# S3_USE_PATH_STYLE=true

FRONTEND_URL=http://localhost:5173
AUTH_URL=http://localhost:43001
AUTH_PORT=3001
AUTH_SERVICE_URL=http://localhost:43001
CORS_ALLOW_ORIGINS=http://localhost:5173,http://127.0.0.1:5173,http://localhost:43001,http://127.0.0.1:43001
AUTH_MAGIC_LINK_PROVIDER=dev-mailbox
AUTH_DEV_MAILBOX_ENABLED=true
# Optional: guard /v1/metrics and /v1/metrics/prometheus with a token
# METRICS_AUTH_TOKEN=replace-me-with-a-strong-metrics-token
# Optional SMTP magic-link transport:
# AUTH_MAGIC_LINK_PROVIDER=smtp
# AUTH_MAIL_FROM=no-reply@example.com
# AUTH_SMTP_HOST=smtp.example.com
# AUTH_SMTP_PORT=587
# AUTH_SMTP_SECURE=false
# AUTH_SMTP_USER=smtp-user
# AUTH_SMTP_PASSWORD=smtp-password

VITE_FRONTEND_URL=http://localhost:5173
VITE_AUTH_URL=http://localhost:43001
VITE_API_URL=http://localhost:48080
VITE_DEV_MAILBOX_ENABLED=true

# Optional backup-job alerts (used by scripts/ops/backup-job.sh)
# OPS_ALERT_WEBHOOK_URL=https://hooks.example.com/productier-backup
# OPS_ALERT_WEBHOOK_BEARER_TOKEN=webhook-token
# OPS_NOTIFY_ON_SUCCESS=false
# OPS_ALERT_TIMEOUT_SECONDS=10
# DRILL_WEBHOOK_URL=https://hooks.example.com/productier-drill
# DRILL_WEBHOOK_BEARER_TOKEN=drill-webhook-token
# DRILL_NOTIFY_ON_SUCCESS=true
# DRILL_WEBHOOK_TIMEOUT_SECONDS=10
# OPS_SMOKE_TIMEOUT_SECONDS=15
# OPS_SMOKE_INSECURE_TLS=false
# VERIFY_HTTP_REDIRECT=true
# DEPLOY_PULL=true
# DEPLOY_BUILD=true
# DEPLOY_RUN_SMOKE=true
# DEPLOY_REMOVE_ORPHANS=true
# DEPLOY_HEALTH_TIMEOUT_SECONDS=240
# DEPLOY_HEALTH_POLL_SECONDS=2
# DEPLOY_PRINT_LOGS_ON_FAILURE=true
# DEPLOY_LOG_TAIL_LINES=200

# Optional local test mailbox via `docker compose up -d greenmail`
# Email: test1@localhost
# Password: pwd1
# IMAPS host/port: localhost:3993
# SMTPS host/port: localhost:3465
