Messenger/.env.example
Заид Омар Медхат | Zaid Omar Medhat 62f20f8843 init
2026-07-10 13:31:12 +05:00

58 lines
2.1 KiB
Text

# ============================================================================
# Altricade Messenger — environment template.
# Copy to `.env` (gitignored) and replace every value below.
# The values here are CLEARLY-FAKE dev placeholders — NEVER use in production.
# ============================================================================
# --- General ---
NODE_ENV=development
# --- Backend (Fastify) ---
BACKEND_PORT=4000
# Public base URL nginx exposes the API under (used for CORS, links).
PUBLIC_API_URL=http://localhost:8080
# --- App auth tokens (Phase 1) ---
# Signing key for short-lived access JWTs. Generate: `openssl rand -base64 48`
JWT_ACCESS_SECRET=dev-CHANGE-ME-access-secret-not-for-prod
ACCESS_TOKEN_TTL=15m
REFRESH_TOKEN_TTL=30d
# --- Centrifugo connection token (SEPARATE from app tokens) ---
# HMAC secret SHARED between backend (mints) and Centrifugo (verifies).
# Generate: `openssl rand -base64 48`
CENTRIFUGO_TOKEN_HMAC_SECRET=dev-CHANGE-ME-centrifugo-hmac-not-for-prod
# API key the backend uses to call Centrifugo's server HTTP API (publish, etc).
CENTRIFUGO_API_KEY=dev-CHANGE-ME-centrifugo-api-key
# Internal URL of the Centrifugo HTTP API (service name on the compose network).
CENTRIFUGO_API_URL=http://centrifugo:8000/api
# --- Postgres ---
POSTGRES_HOST=postgres
POSTGRES_PORT=5432
POSTGRES_DB=altricade
POSTGRES_USER=altricade
POSTGRES_PASSWORD=dev-CHANGE-ME-postgres-password
# Full URL derived from the above (used by backend + migrations).
DATABASE_URL=postgres://altricade:dev-CHANGE-ME-postgres-password@postgres:5432/altricade
# --- Redis (Centrifugo scaling + history/recovery; auth rate-limiting later) ---
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_URL=redis://redis:6379
# --- MinIO (object storage: media messages + avatars) ---
MINIO_ROOT_USER=altricade
MINIO_ROOT_PASSWORD=dev-CHANGE-ME-minio-password
MINIO_ENDPOINT=minio
MINIO_PORT=9000
MINIO_USE_SSL=false
MINIO_BUCKET_MEDIA=media
MINIO_BUCKET_AVATARS=avatars
# --- nginx (public entrypoint) ---
NGINX_HTTP_PORT=8080
# --- Web (Vite) ---
# Base URL the web client points at for REST + realtime.
VITE_API_URL=http://localhost:8080