# --------------------------------------------------------------------------- # FieldOps — environment variables # --------------------------------------------------------------------------- # Copy this file to .env (cp .env.example .env) and adjust as needed for your # local environment. Never commit .env. # Postgres connection string. Matches docker-compose.yml defaults. DATABASE_URL="postgresql://fieldops:fieldops@localhost:5432/fieldops?schema=public" # Auth.js v5 — secret used to sign session tokens. # In production, set this to a strong random value: `openssl rand -base64 32`. AUTH_SECRET="dev-secret-do-not-use-in-production-please-change-me" # Dev-only auto sign-in. # When set to "true", the app will silently sign in as the seed admin user # (admin@demo.local of the "Demo Factory" tenant) on every request that has # no session. This skips the login UI in local development and CI/E2E. # # !!! NEVER set this to "true" in production. !!! # Even if set to "true", this flag is IGNORED when NODE_ENV=production. # The default of "false" here is intentional — a developer setting up locally # must consciously opt in by editing their .env. See README "Auth" section. AUTH_DEV_AUTOLOGIN="false" # Base URL Auth.js uses to build callback/redirect URLs. Must match the host of # the app being served. This shared .env holds ONE value — the operator-pwa # (:3000). The admin-web (:3001) gets its own from apps/admin-web/.env.admin, # which its `dev` script loads with precedence over this file — so admin login # works with autologin OFF without any extra step. # - Production: each app still gets its own AUTH_URL from the deploy env # (a value already in the process wins over .env.admin). NEXT_PUBLIC_APP_URL="http://localhost:3000" AUTH_URL="http://localhost:3000" # Pino log level — one of: fatal, error, warn, info, debug, trace. LOG_LEVEL="info" # Node environment — intentionally NOT set here. # Next.js sets NODE_ENV automatically (development/production/test). # Setting it via dotenv-cli before `next build` forces the dev runtime and # breaks static page generation. # MinIO / S3-compatible object storage. Matches docker-compose.yml defaults. # S3_FORCE_PATH_STYLE=true is required for MinIO (and other self-hosted S3 impls). S3_ENDPOINT="http://localhost:9000" S3_REGION="us-east-1" S3_BUCKET="fieldops" S3_ACCESS_KEY="fieldops" S3_SECRET_KEY="fieldops123" S3_FORCE_PATH_STYLE="true" MINIO_ROOT_USER="fieldops" MINIO_ROOT_PASSWORD="fieldops123"