Files
guilan-ace-backend/.env.example
Amirhossein Khalili b7b21a6cc6
Some checks failed
Backend CI/CD / test (push) Has been cancelled
Backend CI/CD / deploy (push) Has been cancelled
feat(backend): migrate auth and notifications off email
2026-05-21 10:28:04 +03:30

94 lines
2.6 KiB
Plaintext

# Gunicorn
GUNICORN_WORKERS=3
GUNICORN_THREADS=2
GUNICORN_TIMEOUT=120
# Django
DJANGO_SETTINGS_MODULE=config.settings.production
SECRET_KEY=replace-with-a-long-random-secret
DEBUG=False
ALLOWED_HOSTS=east-guilan-ce.ir,api.east-guilan-ce.ir,web
DJANGO_HOST=https://api.example.com
SITE_URL=https://api.example.com
# Database
DB_ENGINE=django.db.backends.postgresql
DB_NAME=cs_association
DB_USER=postgres
DB_PASSWORD=change-me
DB_HOST=db
DB_PORT=5432
# Redis / Celery
REDIS_PASSWORD=change-me
REDIS_URL=redis://:change-me@redis:6379/0
CELERY_BROKER_URL=redis://:change-me@redis:6379/0
CELERY_RESULT_BACKEND=redis://:change-me@redis:6379/1
# Email
EMAIL_BACKEND=django.core.mail.backends.smtp.EmailBackend
EMAIL_HOST=smtp.example.com
EMAIL_PORT=587
EMAIL_USE_SSL=False
EMAIL_USE_TLS=True
EMAIL_HOST_USER=smtp-user
EMAIL_HOST_PASSWORD=smtp-password
DEFAULT_FROM_EMAIL=admin@example.com
# SMS.ir
SMS_APIKEY=replace-with-sms-ir-api-key
SMS_AUTH_OTP_TEMPLATE_ID=100000
SMS_EVENT_CANCELLATION_TEMPLATE_ID=100001
SMS_EVENT_RESCHEDULE_TEMPLATE_ID=100002
SMS_PAYMENT_STATUS_TEMPLATE_ID=100003
# Google OAuth
GOOGLE_OAUTH_CLIENT_ID=replace-with-google-client-id
GOOGLE_OAUTH_CLIENT_SECRET=replace-with-google-client-secret
GOOGLE_OAUTH_REDIRECT_URI=https://api.example.com/api/auth/oauth/google/callback
GOOGLE_OAUTH_FRONTEND_CALLBACK_URL=https://frontend.example.com/auth/google/callback
# JWT
JWT_SECRET_KEY=replace-with-a-second-long-random-secret
JWT_ALGORITHM=HS256
JWT_ACCESS_TOKEN_LIFETIME=3600
JWT_REFRESH_TOKEN_LIFETIME=86400
# Frontend integration
CORS_ALLOWED_ORIGINS=https://frontend.example.com,https://api.example.com
CSRF_TRUSTED_ORIGINS=https://frontend.example.com,https://api.example.com
CORS_ALLOW_CREDENTIALS=True
CSRF_COOKIE_SECURE=True
SESSION_COOKIE_SECURE=True
FRONTEND_ROOT=https://frontend.example.com
FRONTEND_PASSWORD_RESET_PAGE=https://frontend.example.com/reset-password
FRONTEND_CALLBACK_URL=https://frontend.example.com/payments/result
# SSE Notifications
NOTIFICATIONS_ENABLED=True
NOTIFICATION_STREAM_TOKEN_LIFETIME_SECONDS=300
NOTIFICATION_SSE_HEARTBEAT_SECONDS=20
NOTIFICATION_SSE_RETRY_MS=3000
NOTIFICATION_REDIS_CHANNEL_PREFIX=notif
NOTIFICATION_RETENTION_DAYS=30
NOTIFICATION_DEFAULT_PAGE_SIZE=20
NOTIFICATION_MAX_PAGE_SIZE=100
# Optional web-push settings kept for legacy admin flows
VAPID_PUBLIC_KEY=
VAPID_PRIVATE_KEY=
VAPID_SUBJECT=mailto:admin@example.com
# ZarinPal
ZARINPAL_MERCHANT_ID=merchant-id
ZARINPAL_USE_SANDBOX=False
ZARINPAL_CALLBACK_URL=https://api.example.com/api/payments/callback
# Optional test overrides
TEST_DB_ENGINE=django.db.backends.sqlite3
TEST_DB_NAME=db.test.sqlite3
TEST_DB_USER=
TEST_DB_PASSWORD=
TEST_DB_HOST=
TEST_DB_PORT=