# ============================================================ # 9a3ida Ballon d'Or — root environment template # Copy to `.env` and fill values. Never commit `.env`. # ============================================================ # ---------- Django / Backend ---------- DJANGO_SECRET_KEY=change-me-to-a-long-random-string DJANGO_DEBUG=True DJANGO_ALLOWED_HOSTS=localhost,127.0.0.1,backend DJANGO_SETTINGS_MODULE=core.settings # CORS / CSRF (frontend origin) CORS_ALLOWED_ORIGINS=http://localhost:5173 CSRF_TRUSTED_ORIGINS=http://localhost:5173 # ---------- Database (Postgres) ---------- # Local docker-compose Postgres POSTGRES_DB=ballon_dor POSTGRES_USER=ballon_dor POSTGRES_PASSWORD=POSTGRES_PASSWORD POSTGRES_HOST=db POSTGRES_PORT=5432 # Local Docker postgres (default dev) DATABASE_URL=postgres://ballon_dor:POSTGRES_PASSWORD@db:5432/ballon_dor # Supabase postgres — use session-mode pooler (port 5432, IPv4, Django-compatible) # NEVER use port 6543 (transaction mode) — Django migrations will fail # DATABASE_URL=postgresql://postgres.:@aws-0-.pooler.supabase.com:5432/postgres # ---------- Supabase (production storage + optional prod DB) ---------- # Leave blank in dev; populate when deploying SUPABASE_URL= SUPABASE_ANON_KEY= SUPABASE_SERVICE_ROLE_KEY= # Supabase Storage S3-compatible endpoint (used by django-storages) # Leave all blank for local dev (filesystem storage used instead) # S3 API endpoint: https://.supabase.co/storage/v1/s3 SUPABASE_S3_ENDPOINT= # Region shown in Supabase dashboard → Project Settings → General SUPABASE_S3_REGION= # From Supabase dashboard → Storage → S3 Access Keys → Generate new keys SUPABASE_S3_ACCESS_KEY= SUPABASE_S3_SECRET_KEY= SUPABASE_S3_BUCKET=profile-photos # Public download base URL (bucket must be set to Public): # https://.supabase.co/storage/v1/object/public/profile-photos SUPABASE_STORAGE_PUBLIC_URL= # ---------- JWT ---------- JWT_ACCESS_LIFETIME_MINUTES=60 JWT_REFRESH_LIFETIME_DAYS=7 # ---------- Frontend ---------- # Used by vite.config.ts (Node-side proxy target, NOT exposed to browser) # In Docker: backend resolves via Docker network name # Outside Docker: use http://localhost:8000 BACKEND_URL=http://backend:8000