init
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
# Production environment template (AWS RDS MySQL).
|
||||
# Copy to .env.production on the EC2 host and fill in the real credentials.
|
||||
# The real .env.production is gitignored so secrets never land in git.
|
||||
#
|
||||
# For Prisma CLI commands (migrate/seed), export these first:
|
||||
# set -a && source .env.production && set +a
|
||||
#
|
||||
# Note: if the DB password contains URL-reserved characters, percent-encode them
|
||||
# (e.g. "@" -> %40, "/" -> %2F, ":" -> %3A).
|
||||
DATABASE_URL="mysql://USER:PASSWORD@it-cost-prod-db.c8hgbsblyypx.us-west-2.rds.amazonaws.com:3306/it_cost_dashboard"
|
||||
DATABASE_PROVIDER="mysql"
|
||||
NODE_ENV="production"
|
||||
|
||||
# --- Microsoft Entra ID (Azure AD) SSO ---
|
||||
# Next.js does NOT load .env.local in production, so prod auth vars MUST live here.
|
||||
# Register the prod redirect URI in Azure:
|
||||
# https://<your-prod-domain>/api/auth/callback/microsoft-entra-id
|
||||
AUTH_MICROSOFT_ENTRA_ID_ID="<prod Application (client) ID>"
|
||||
AUTH_MICROSOFT_ENTRA_ID_SECRET="<prod client secret VALUE>"
|
||||
AUTH_MICROSOFT_ENTRA_ID_ISSUER="https://login.microsoftonline.com/<Directory (tenant) ID>/v2.0"
|
||||
# 32-byte random string used to sign session cookies (generate: npx auth secret).
|
||||
AUTH_SECRET="<prod AUTH_SECRET>"
|
||||
# Canonical public URL of the app. If TLS is terminated by a proxy/ALB in front
|
||||
# of the app, set AUTH_TRUST_HOST=true instead of (or in addition to) AUTH_URL.
|
||||
AUTH_URL="https://<your-prod-domain>"
|
||||
# AUTH_TRUST_HOST=true
|
||||
|
||||
# --- Local break-glass admin + role model ---
|
||||
# In addition to SSO, /login offers a username/password form for a local admin.
|
||||
# A NON-EMPTY password ENABLES it; leave empty to disable local login entirely.
|
||||
# This account always has the admin role and bypasses config/users.json (so you
|
||||
# can still get in to fix a broken/empty allowlist).
|
||||
LOCAL_ADMIN_USERNAME="admin"
|
||||
LOCAL_ADMIN_PASSWORD="<set a strong password to enable local login>"
|
||||
|
||||
# Role-based access is driven by the committed, hand-edited allowlist
|
||||
# config/users.json (email -> "admin" | "user"). SSO emails NOT listed there
|
||||
# cannot sign in (fail closed). Edit that file and re-login / restart to apply.
|
||||
Reference in New Issue
Block a user