video-accessibility/.env.local
michael 77dc58b124 fix: add Cloud Run URLs to .env.local for docker-compose
Docker-compose reads from root .env (symlinked to .env.local), not
backend/.env. Added WHISPER_SERVICE_URL, FFMPEG_SERVICE_URL, and
worker concurrency settings to enable Cloud Run autoscaling.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 10:54:27 -06:00

118 lines
5.3 KiB
Text

# =============================================================================
# Local Development Environment Variables for Accessible Video Platform
# =============================================================================
# IMPORTANT: This file is for local Docker-based development only
# Usage: ./scripts/run-local.sh (backend) + npm run dev (frontend)
# =============================================================================
# -----------------------------------------------------------------------------
# App Configuration
# -----------------------------------------------------------------------------
APP_ENV=dev
API_BASE_URL=http://localhost:8000
# -----------------------------------------------------------------------------
# Authentication & Security
# -----------------------------------------------------------------------------
# Using same JWT secret as production (shared between environments)
JWT_SECRET=CHANGE_ME_TO_SECURE_RANDOM_64_CHAR_STRING
JWT_ALG=HS256
JWT_ACCESS_TTL_MIN=240
JWT_REFRESH_TTL_DAYS=7
# Local development cookie settings (HTTP, not HTTPS)
COOKIE_DOMAIN=localhost
COOKIE_SECURE=false
COOKIE_SAMESITE=Lax
# -----------------------------------------------------------------------------
# MongoDB Configuration
# -----------------------------------------------------------------------------
# MongoDB runs without authentication in the internal Docker network
MONGODB_DB=accessible_video
# Note: MongoDB connection string is auto-constructed in docker-compose.yml
# Format: mongodb://mongodb:27017/${MONGODB_DB}
# -----------------------------------------------------------------------------
# Redis Configuration
# -----------------------------------------------------------------------------
# Redis runs without authentication in the internal Docker network
# No configuration needed - connection strings in docker-compose.yml
# REDIS_URL=redis://redis:6379/0
# -----------------------------------------------------------------------------
# Google Cloud Platform (GCP)
# -----------------------------------------------------------------------------
GCP_PROJECT_ID=optical-414516
GCS_BUCKET=accessible-video
# GCP credentials file will be mounted as a volume
# Location inside container: /secrets/gcp-credentials.json
# Local source: ./secrets/gcp-credentials.json
# -----------------------------------------------------------------------------
# AI Services
# -----------------------------------------------------------------------------
# Using same API keys as production
GEMINI_API_KEY=AIzaSyAuuVGcvqfoP7pqX-YwieGszPsNSeAft-0
# Google Cloud Translate (Optional - for translation features)
TRANSLATE_API_KEY=
# ElevenLabs TTS (Optional - for text-to-speech)
ELEVENLABS_API_KEY=
# -----------------------------------------------------------------------------
# Email Configuration (SendGrid)
# -----------------------------------------------------------------------------
# Optional: Leave empty to disable email sending in local dev
SENDGRID_API_KEY=
# Email sender address (local development)
EMAIL_FROM=noreply@localhost
# Client-facing URL (used in emails) - points to local frontend
CLIENT_BASE_URL=http://localhost:6001/video-accessibility
# -----------------------------------------------------------------------------
# Microsoft Authentication (Azure AD)
# -----------------------------------------------------------------------------
AZURE_CLIENT_ID=9079054c-9620-4757-a256-23413042f1ef
AZURE_AUTHORITY=https://login.microsoftonline.com/e519c2e6-bc6d-4fdf-8d9c-923c2f002385
AZURE_REDIRECT_URI=http://localhost:6001/video-accessibility/
# -----------------------------------------------------------------------------
# CORS Configuration
# -----------------------------------------------------------------------------
# Comma-separated list of allowed origins for local development
CORS_ORIGINS=http://localhost:6001,http://localhost:5173,http://localhost:3000
# -----------------------------------------------------------------------------
# Observability & Monitoring (Optional)
# -----------------------------------------------------------------------------
# Disabled for local development
SENTRY_DSN=
OTEL_EXPORTER_OTLP_ENDPOINT=
# -----------------------------------------------------------------------------
# Cloud Run Services (Autoscaling for CPU-intensive work)
# -----------------------------------------------------------------------------
# When set, Whisper and FFmpeg operations are offloaded to Cloud Run
WHISPER_SERVICE_URL=https://whisper-http-service-bcb6ipdqka-uc.a.run.app
FFMPEG_SERVICE_URL=https://ffmpeg-http-service-bcb6ipdqka-uc.a.run.app
# Worker concurrency (higher values since workers just make HTTP calls)
WHISPER_WORKER_CONCURRENCY=10
FFMPEG_WORKER_CONCURRENCY=20
WORKER_CONCURRENCY=8
# =============================================================================
# LOCAL DEVELOPMENT NOTES
# =============================================================================
# - Backend services run in Docker: API (port 8003), Worker, MongoDB, Redis
# - Frontend runs via npm: http://localhost:6001/video-accessibility
# - MongoDB and Redis data persists in Docker volumes
# - Same GCP credentials and API keys as production
# - Cookies work on localhost (not secure, for dev only)
# =============================================================================