* HH-437 harden auth and account authorization * HH-437 reject revoked platform access --------- Co-authored-by: Rogee <rogee@ipao.vip>
70 lines
2.1 KiB
Bash
70 lines
2.1 KiB
Bash
# GoChat Environment Variables
|
|
# Copy to .env and fill in your values. NEVER commit .env to git.
|
|
|
|
# ---- Application ----
|
|
GOCHAT_ENV=prod
|
|
# Keep disabled in production. Enable only for controlled QA/UAT environments.
|
|
|
|
# ---- Server ----
|
|
GOCHAT_SERVER_HOST=0.0.0.0
|
|
GOCHAT_SERVER_PORT=3000
|
|
GOCHAT_SERVER_MODE=release # debug, release, test
|
|
|
|
# ---- Database ----
|
|
GOCHAT_DATABASE_DSN=postgres://gochat:CHANGE_ME_TO_A_STRONG_PASSWORD@localhost:5432/gochat_production?sslmode=disable
|
|
GOCHAT_DATABASE_MAX_IDLE_CONNS=10
|
|
GOCHAT_DATABASE_MAX_OPEN_CONNS=100
|
|
GOCHAT_DATABASE_CONN_MAX_LIFETIME=3600
|
|
|
|
# ---- Redis ----
|
|
GOCHAT_REDIS_DSN=redis://localhost:6379
|
|
GOCHAT_REDIS_POOL_SIZE=50
|
|
|
|
# ---- JWT ----
|
|
GOCHAT_JWT_SECRET=CHANGE_ME_TO_A_RANDOM_64_CHAR_STRING
|
|
# Optional during a bounded rotation window; comma-separated old 32+ byte secrets.
|
|
GOCHAT_JWT_PREVIOUS_SECRETS=
|
|
GOCHAT_JWT_EXPIRY_HOURS=72
|
|
GOCHAT_JWT_ACCESS_EXPIRY_MINUTES=15
|
|
GOCHAT_JWT_REFRESH_EXPIRY_HOURS=168
|
|
|
|
# ---- Logging ----
|
|
GOCHAT_LOG_LEVEL=info # debug, info, warn, error
|
|
GOCHAT_LOG_FORMAT=json # json, text
|
|
|
|
# ---- SMTP / Email ----
|
|
SMTP_ADDRESS=smtp.example.com
|
|
SMTP_PORT=587
|
|
SMTP_USERNAME=your-email@example.com
|
|
SMTP_PASSWORD=your-email-password
|
|
|
|
# ---- Worker ----
|
|
GOCHAT_WORKER_CONCURRENCY=10
|
|
|
|
# ---- Frontend URL ----
|
|
FRONTEND_URL=https://your-domain.com
|
|
|
|
# ---- Search ----
|
|
GOCHAT_SEARCH_ENGINE=meilisearch
|
|
GOCHAT_SEARCH_HOST=http://localhost:7700
|
|
GOCHAT_SEARCH_API_KEY=
|
|
GOCHAT_SEARCH_INDEX_PREFIX=gochat_
|
|
GOCHAT_SEARCH_TIMEOUT_SECONDS=5
|
|
|
|
# ---- Storage ----
|
|
GOCHAT_STORAGE_PROVIDER=local
|
|
GOCHAT_STORAGE_LOCAL_PATH=./uploads
|
|
GOCHAT_STORAGE_MAX_FILE_SIZE=20971520 # 20MB
|
|
|
|
# ---- OIDC (Enterprise OAuth/OIDC SSO, disabled by default) ----
|
|
GOCHAT_OIDC_ENABLED=false
|
|
GOCHAT_OIDC_DEFAULT_CLIENT_ID=
|
|
GOCHAT_OIDC_DEFAULT_CLIENT_SECRET=
|
|
GOCHAT_OIDC_DEFAULT_REDIRECT_URL=https://your-domain.com/api/v1/oidc/callback
|
|
GOCHAT_OIDC_DEFAULT_ISSUER_URL=https://accounts.google.com
|
|
GOCHAT_OIDC_DEFAULT_AUTHORIZATION_URL=
|
|
GOCHAT_OIDC_DEFAULT_TOKEN_URL=
|
|
GOCHAT_OIDC_DEFAULT_USER_INFO_URL=
|
|
GOCHAT_OIDC_DEFAULT_JWKS_URL=
|
|
GOCHAT_OIDC_DEFAULT_SCOPES=openid,profile,email
|