Files
gameno-api/.env.example
T
kavehhn 4603b45208 feat: private certificates/documents buckets with SeaweedFS support
Add Document CRUD, temp→bucket commit flow, SeaweedFS env aliases, and default temp bucket name to temp.
2026-08-15 02:53:59 +03:30

89 lines
2.8 KiB
Bash

# Environment Configuration
NODE_ENV=development
PORT=3000
MONGO_URI=mongodb://localhost:27017/teaching_institution_db
# Authentication JWT
JWT_ACCESS_SECRET=your_super_secret_access_token_key_change_me
JWT_REFRESH_SECRET=your_super_secret_refresh_token_key_change_me
JWT_ACCESS_EXPIRES_IN=15m
JWT_REFRESH_EXPIRES_IN=7d
# Localization & File Uploads
DEFAULT_LANG=fa
CORS_ORIGIN=*
UPLOAD_PATH=uploads
# -----------------------------------------------------------------------------
# S3-compatible object storage
# Local default: MinIO (docker-compose)
# Production (SeaweedFS): set SERVICE_* / AWS_* from your host, or set S3_* directly
# -----------------------------------------------------------------------------
# Local MinIO example:
S3_ENDPOINT=http://localhost:9000
S3_REGION=us-east-1
S3_ACCESS_KEY=minioadmin
S3_SECRET_KEY=minioadmin
# SeaweedFS live example (preferred aliases also work without S3_*):
# Use the public HTTPS URL (SERVICE_URL_S3). Port 8333 is often internal-only.
# S3_ENDPOINT=https://s3.game-no.ir
# SERVICE_URL_S3=https://s3.game-no.ir
# SERVICE_URL_S3_8333=https://s3.game-no.ir:8333
# SERVICE_USER_S3=...
# SERVICE_PASSWORD_S3=...
# AWS_ACCESS_KEY_ID=${SERVICE_USER_S3}
# AWS_SECRET_ACCESS_KEY=${SERVICE_PASSWORD_S3}
S3_TEMP_BUCKET=temp
S3_CERTIFICATES_BUCKET=certificates
S3_DOCUMENTS_BUCKET=documents
S3_STORAGE_BUCKET=certificates
S3_FORCE_PATH_STYLE=true
SIGNED_URL_EXPIRES_IN=900
# Private by default — set true only if a bucket is publicly readable
S3_CERTIFICATES_PUBLIC=false
S3_DOCUMENTS_PUBLIC=false
# Optional public CDN/base URL used only when a bucket is public
S3_PUBLIC_BASE_URL=
# Optional SeaweedFS admin console (bucket management UI)
# SERVICE_URL_ADMIN=https://admin-s3.game-no.ir
# SERVICE_URL_ADMIN_23646=https://admin-s3.game-no.ir:23646
# SERVICE_USER_ADMIN=...
# SERVICE_PASSWORD_ADMIN=...
# SEAWEED_USER_ADMIN=${SERVICE_USER_ADMIN}
# SEAWEED_PASSWORD_ADMIN=${SERVICE_PASSWORD_ADMIN}
# SMTP Email Configuration
SMTP_HOST=smtp.mailtrap.io
SMTP_PORT=2525
SMTP_USER=your_smtp_user
SMTP_PASS=your_smtp_password
EMAIL_FROM=no-reply@institution.com
# SMS Provider Configuration (sms.ir)
SMS_ENABLED=false
SMS_PANEL_TOKEN=your_sms_ir_api_key
SMS_SENDER_NUMBER=10001000
# Template IDs from sms.ir panel (verify templates)
# Account created vars: username, password
SMS_TEMPLATE_ACCOUNT_CREATED=
# Class registered vars: className
SMS_TEMPLATE_CLASS_REGISTERED=
# Class reminder (30 min before) vars: className, time, place
SMS_TEMPLATE_CLASS_REMINDER=
# Bale Messenger Bot Token
BALE_BOT_TOKEN=mock_bale_bot_token
# SuperAdmin bootstrap (created automatically in production)
# Set SUPERADMIN_ENABLED=false to deactivate the bootstrap SuperAdmin and block login
SUPERADMIN_ENABLED=true
SUPERADMIN_USERNAME=
SUPERADMIN_PASSWORD=
SUPERADMIN_EMAIL=
SUPERADMIN_NATIONAL_ID=0000000000
SUPERADMIN_PHONE=09000000000