|
| 1 | +# =================================== |
| 2 | +# Blend Monitor - Environment Variables Template |
| 3 | +# =================================== |
| 4 | +# Copy this file to .env.local for local development |
| 5 | +# Replace placeholder values with actual credentials |
| 6 | +# NEVER commit .env.local or .env.production to git! |
| 7 | +# =================================== |
| 8 | + |
| 9 | +# =================================== |
| 10 | +# Firebase Client Configuration (Public - Safe to expose in frontend) |
| 11 | +# =================================== |
| 12 | +NEXT_PUBLIC_FIREBASE_API_KEY=your-firebase-api-key-here |
| 13 | +NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your-project-id.firebaseapp.com |
| 14 | +NEXT_PUBLIC_FIREBASE_PROJECT_ID=your-project-id |
| 15 | +NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your-project-id.firebasestorage.app |
| 16 | +NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your-sender-id |
| 17 | +NEXT_PUBLIC_FIREBASE_APP_ID=1:your-sender-id:web:your-app-id |
| 18 | +NEXT_PUBLIC_FIREBASE_DATABASE_URL=https://your-project-id-default-rtdb.region.firebasedatabase.app |
| 19 | + |
| 20 | +# =================================== |
| 21 | +# Firebase Admin Configuration (Private - Server-side only) |
| 22 | +# =================================== |
| 23 | +FIREBASE_PROJECT_ID=your-project-id |
| 24 | +FIREBASE_DATABASE_URL=https://your-project-id-default-rtdb.region.firebasedatabase.app |
| 25 | +FIREBASE_CLIENT_EMAIL=your-service-account@your-project-id.iam.gserviceaccount.com |
| 26 | +# FIREBASE_PRIVATE_KEY should come from Secret Manager in production |
| 27 | +# For local development, use Cloud SQL Proxy and Secret Manager |
| 28 | +# DO NOT hardcode the private key here! |
| 29 | + |
| 30 | +# =================================== |
| 31 | +# Database Configuration (Local Development via Cloud SQL Proxy) |
| 32 | +# =================================== |
| 33 | +DATABASE_HOST=localhost |
| 34 | +DATABASE_PORT=5433 |
| 35 | +DATABASE_NAME=blend_monitor |
| 36 | +DATABASE_USER=admin |
| 37 | +# DATABASE_PASSWORD should come from Secret Manager |
| 38 | +# For local development: |
| 39 | +# 1. Start Cloud SQL Proxy: ./cloud_sql_proxy -instances=PROJECT:REGION:INSTANCE=tcp:5433 |
| 40 | +# 2. Set password from Secret Manager: gcloud secrets versions access latest --secret="blend-monitor-db-password" |
| 41 | +# DO NOT hardcode the password here! |
| 42 | + |
| 43 | +# Database URL (constructed from above values) |
| 44 | +# DATABASE_URL=postgresql://admin:PASSWORD_FROM_SECRET_MANAGER@localhost:5433/blend_monitor |
| 45 | + |
| 46 | +# =================================== |
| 47 | +# Application Settings |
| 48 | +# =================================== |
| 49 | +NODE_ENV=development |
| 50 | + |
| 51 | +# =================================== |
| 52 | +# Production Configuration |
| 53 | +# =================================== |
| 54 | +# In production (Cloud Run), these are set via: |
| 55 | +# - Environment variables in cloudbuild.yaml |
| 56 | +# - Secrets from Secret Manager |
| 57 | +# - Cloud SQL Unix socket connection |
| 58 | +# |
| 59 | +# DO NOT use .env files in production! |
| 60 | +# All sensitive values MUST come from Secret Manager |
| 61 | +# |
| 62 | +# Production secrets: |
| 63 | +# - DATABASE_PASSWORD → blend-monitor-db-password (Secret Manager) |
| 64 | +# - FIREBASE_PRIVATE_KEY → blend-monitor-firebase-key (Secret Manager) |
| 65 | +# =================================== |
| 66 | + |
| 67 | +# =================================== |
| 68 | +# Local Development Setup Instructions |
| 69 | +# =================================== |
| 70 | +# 1. Copy this file: cp .env.example .env.local |
| 71 | +# 2. Get Firebase config from Firebase Console |
| 72 | +# 3. Set up Cloud SQL Proxy for database access |
| 73 | +# 4. Get database password from Secret Manager: |
| 74 | +# gcloud secrets versions access latest --secret="blend-monitor-db-password" --project=PROJECT_ID |
| 75 | +# 5. Get Firebase private key from Secret Manager: |
| 76 | +# gcloud secrets versions access latest --secret="blend-monitor-firebase-key" --project=PROJECT_ID |
| 77 | +# 6. Update .env.local with actual values |
| 78 | +# =================================== |
0 commit comments