Finance-Accounts/ar-aging-app/.env.example

68 lines
2.6 KiB
Bash

# ==============================================================================
# AR Aging — environment template (this file IS committed; real copies are NOT)
#
# Local development: cp .env.example .env -> fill the LOCAL section
# Production (AWS): cp .env.example .env.production -> fill the PRODUCTION section
#
# .env and .env.production are gitignored — secrets never enter git.
# ==============================================================================
# ------------------------------------------------------------------ LOCAL (dev)
# Database: leave MYSQL_* unset and the app uses a local SQLite file —
# backend/data/ar_aging.db (zero setup; this is the local database "name")
# Force it explicitly if you like:
AR_DB_BACKEND=sqlite
# Signs login tokens (sessions survive backend restarts). Generate:
# python -c "import secrets; print(secrets.token_hex(32))"
AR_SECRET_KEY=
# Login: auto = required as soon as users exist (create with: python manage.py add-user)
AR_AUTH=auto
# Vite dev server origins
AR_CORS_ORIGINS=http://localhost:5173,http://127.0.0.1:5173,http://localhost:5174,http://127.0.0.1:5174
# Exchange rates: frankfurter = free, keyless, central-bank rates
AR_FX_PROVIDER=frankfurter
# Generated exports older than this are purged (uploads are NEVER auto-deleted). 0 = keep.
AR_RETENTION_DAYS=90
# ------------------------------------------------------------- PRODUCTION (AWS)
# Used by docker-compose.prod.yml. Fill these in .env.production on the server.
# Domain — DNS A record must point at the server; HTTPS certificate is automatic.
#AR_DOMAIN=ar.utopiabrands.com
# MySQL (the database is created automatically on first start).
# MYSQL_HOST is set to the compose service name by docker-compose.prod.yml.
#MYSQL_PORT=3306
#MYSQL_DATABASE=account_finance
#MYSQL_USER=ar_app
#MYSQL_PASSWORD= <- strong generated password
#MYSQL_ROOT_PASSWORD= <- different strong generated password
#MYSQL_SLOW_QUERY_MS=500
#MYSQL_POOL_SIZE=10
#MYSQL_POOL_RECYCLE=3600
# Auth — REQUIRED in production. Different key than local!
#AR_SECRET_KEY= <- openssl rand -hex 32
#AR_AUTH=on
#AR_AUTH_TOKEN_HOURS=12
# Same-origin behind nginx/caddy; still set exactly.
#AR_CORS_ORIGINS=https://ar.utopiabrands.com
#AR_FX_PROVIDER=frankfurter
# AR_FX_PROVIDER=exchangerate-api # paid fallback ($10/mo) — then set:
# AR_FX_API_KEY=
#AR_RETENTION_DAYS=90
# AR_MAX_UPLOAD_BYTES=2147483648 # 2 GB default
# Nightly backups (deploy/backup.sh) — S3 bucket; instance IAM role grants access.
#AR_BACKUP_S3_BUCKET=s3://utopia-ar-backups