TorbatYar/infrastructure/deploy/.env.production.example
Mortezakoohjani 047cd17afd fix(frontend): pass all BFF service URLs to frontend container
Wire CRM, loyalty, communication, and delivery service URLs into docker-compose
so Next.js API proxies reach Docker network hosts instead of localhost fallbacks.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-27 13:28:50 +03:30

151 lines
6.6 KiB
Plaintext

# ============================================================
# TorbatYar production env — copy to .env on app server
# Domain: torbatyar.ir | App: 192.168.10.162 | Nginx: 192.168.10.156
# ============================================================
ENVIRONMENT=production
DEBUG=false
LOG_LEVEL=INFO
SERVICE_NAME=core-service
API_V1_PREFIX=/api/v1
PLATFORM_NAME=Torbatyar
PLATFORM_SUPPORT_EMAIL=support@torbatyar.ir
PLATFORM_PRIMARY_COLOR=#0284c7
PLATFORM_SECONDARY_COLOR=#0f172a
PLATFORM_BASE_DOMAIN=torbatyar.ir
# Auto SSL for tenant domains (Celery → SSH → nginx certbot)
SSL_PROVISION_ENABLED=true
SSL_PROVISION_HOST=192.168.10.156
SSL_PROVISION_USER=torbatyaruser
SSL_PROVISION_PASSWORD=change-me
SSL_PROVISION_SCRIPT=/opt/torbatyar/bin/provision_ssl.py
POSTGRES_HOST=postgres
POSTGRES_PORT=5432
POSTGRES_USER=superapp
POSTGRES_PASSWORD=superapp_password
POSTGRES_DB=core_platform_db
DATABASE_URL=postgresql+asyncpg://superapp:superapp_password@postgres:5432/core_platform_db
DATABASE_URL_SYNC=postgresql+psycopg://superapp:superapp_password@postgres:5432/core_platform_db
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_DB=0
REDIS_URL=redis://redis:6379/0
FEATURE_ACCESS_CACHE_TTL=300
TENANT_METADATA_CACHE_TTL=300
CELERY_BROKER_URL=redis://redis:6379/1
CELERY_RESULT_BACKEND=redis://redis:6379/2
KEYCLOAK_ENABLED=true
KEYCLOAK_SERVER_URL=http://keycloak:8080
KEYCLOAK_PUBLIC_URL=https://auth.torbatyar.ir
KEYCLOAK_REALM=superapp
KEYCLOAK_CLIENT_ID=core-service
KEYCLOAK_CLIENT_SECRET=change-me
JWT_ALGORITHM=RS256
JWT_AUDIENCE=account
JWT_VERIFY_SIGNATURE=true
AUTH_REQUIRED=true
IDENTITY_SERVICE_URL=http://identity-access-service:8001
IDENTITY_DATABASE_URL=postgresql+asyncpg://superapp:superapp_password@postgres:5432/identity_access_db
IDENTITY_DATABASE_URL_SYNC=postgresql+psycopg://superapp:superapp_password@postgres:5432/identity_access_db
KEYCLOAK_FRONTEND_CLIENT_ID=superapp-frontend
KEYCLOAK_IDENTITY_CLIENT_SECRET=change-me-identity
IDENTITY_KEYCLOAK_CLIENT_ID=identity-access-service
FRONTEND_CALLBACK_URL=https://torbatyar.ir/auth/callback
CORS_ORIGINS=https://torbatyar.ir,https://www.torbatyar.ir,http://torbatyar.ir,http://www.torbatyar.ir
CORE_SERVICE_URL=http://core-service:8000
PAYAMAK_USERNAME=9155105404
PAYAMAK_FROM=9982004961
PAYAMAK_FROM_NUMBER=9982004961
PAYAMAK_API_KEY=967ceb37-eeef-429c-b6c5-b60a15306e4f
PAYAMAK_APIKEY=967ceb37-eeef-429c-b6c5-b60a15306e4f
PAYAMAK_PASSWORD=967ceb37-eeef-429c-b6c5-b60a15306e4f
PAYAMAK_BODY_ID=245189
JWT_SECRET=change-me-jwt-secret
OTP_EXPIRE_SECONDS=120
PLATFORM_ADMIN_MOBILES=09155105404
FRONTEND_PORT=3000
NEXT_PUBLIC_PLATFORM_BASE_DOMAIN=torbatyar.ir
NEXT_PUBLIC_BACKEND_URL=https://api.torbatyar.ir
NEXT_PUBLIC_API_BASE_URL=https://api.torbatyar.ir
NEXT_PUBLIC_IDENTITY_API_URL=https://identity.torbatyar.ir
NEXT_PUBLIC_KEYCLOAK_URL=https://auth.torbatyar.ir
NEXT_PUBLIC_KEYCLOAK_REALM=superapp
NEXT_PUBLIC_KEYCLOAK_CLIENT_ID=superapp-frontend
NEXT_PUBLIC_ACCOUNTING_API_URL=https://accounting.torbatyar.ir
NEXT_PUBLIC_CRM_API_URL=https://crm.torbatyar.ir
NEXT_PUBLIC_LOYALTY_API_URL=https://loyalty.torbatyar.ir
NEXT_PUBLIC_COMMUNICATION_API_URL=https://communication.torbatyar.ir
NEXT_PUBLIC_SPORTS_CENTER_API_URL=https://sports-center.torbatyar.ir
NEXT_PUBLIC_DELIVERY_API_URL=https://delivery.torbatyar.ir
NEXT_PUBLIC_EXPERIENCE_API_URL=https://experience.torbatyar.ir
NEXT_PUBLIC_HOSPITALITY_API_URL=https://hospitality.torbatyar.ir
NEXT_PUBLIC_HEALTHCARE_API_URL=https://healthcare.torbatyar.ir
NEXT_PUBLIC_BEAUTY_BUSINESS_API_URL=https://beauty.torbatyar.ir
ACCOUNTING_SERVICE_URL=http://accounting-service:8002
ACCOUNTING_DATABASE_URL=postgresql+asyncpg://superapp:superapp_password@postgres:5432/accounting_db
ACCOUNTING_DATABASE_URL_SYNC=postgresql+psycopg://superapp:superapp_password@postgres:5432/accounting_db
ACCOUNTING_SERVICE_NAME=accounting-service
CRM_SERVICE_URL=http://crm-service:8003
CRM_DATABASE_URL=postgresql+asyncpg://superapp:superapp_password@postgres:5432/crm_db
CRM_DATABASE_URL_SYNC=postgresql+psycopg://superapp:superapp_password@postgres:5432/crm_db
CRM_SERVICE_NAME=crm-service
LOYALTY_SERVICE_URL=http://loyalty-service:8004
LOYALTY_DATABASE_URL=postgresql+asyncpg://superapp:superapp_password@postgres:5432/loyalty_db
LOYALTY_DATABASE_URL_SYNC=postgresql+psycopg://superapp:superapp_password@postgres:5432/loyalty_db
LOYALTY_SERVICE_NAME=loyalty-service
COMMUNICATION_SERVICE_URL=http://communication-service:8005
COMMUNICATION_DATABASE_URL=postgresql+asyncpg://superapp:superapp_password@postgres:5432/communication_db
COMMUNICATION_DATABASE_URL_SYNC=postgresql+psycopg://superapp:superapp_password@postgres:5432/communication_db
COMMUNICATION_SERVICE_NAME=communication-service
SPORTS_CENTER_SERVICE_URL=http://sports-center-service:8006
SPORTS_CENTER_DATABASE_URL=postgresql+asyncpg://superapp:superapp_password@postgres:5432/sports_center_db
SPORTS_CENTER_DATABASE_URL_SYNC=postgresql+psycopg://superapp:superapp_password@postgres:5432/sports_center_db
SPORTS_CENTER_SERVICE_NAME=sports-center-service
DELIVERY_SERVICE_URL=http://delivery-service:8007
DELIVERY_DATABASE_URL=postgresql+asyncpg://superapp:superapp_password@postgres:5432/delivery_db
DELIVERY_DATABASE_URL_SYNC=postgresql+psycopg://superapp:superapp_password@postgres:5432/delivery_db
DELIVERY_SERVICE_NAME=delivery-service
EXPERIENCE_SERVICE_URL=http://experience-service:8008
EXPERIENCE_DATABASE_URL=postgresql+asyncpg://superapp:superapp_password@postgres:5432/experience_db
EXPERIENCE_DATABASE_URL_SYNC=postgresql+psycopg://superapp:superapp_password@postgres:5432/experience_db
EXPERIENCE_SERVICE_NAME=experience-service
HOSPITALITY_SERVICE_URL=http://hospitality-service:8009
HOSPITALITY_DATABASE_URL=postgresql+asyncpg://superapp:superapp_password@postgres:5432/hospitality_db
HOSPITALITY_DATABASE_URL_SYNC=postgresql+psycopg://superapp:superapp_password@postgres:5432/hospitality_db
HOSPITALITY_SERVICE_NAME=hospitality-service
BEAUTY_BUSINESS_SERVICE_URL=http://beauty-business-service:8011
BEAUTY_BUSINESS_DATABASE_URL=postgresql+asyncpg://superapp:superapp_password@postgres:5432/beauty_business_db
BEAUTY_BUSINESS_DATABASE_URL_SYNC=postgresql+psycopg://superapp:superapp_password@postgres:5432/beauty_business_db
BEAUTY_BUSINESS_SERVICE_NAME=beauty-business-service
HEALTHCARE_SERVICE_URL=http://healthcare-service:8010
HEALTHCARE_DATABASE_URL=postgresql+asyncpg://superapp:superapp_password@postgres:5432/healthcare_db
HEALTHCARE_DATABASE_URL_SYNC=postgresql+psycopg://superapp:superapp_password@postgres:5432/healthcare_db
HEALTHCARE_SERVICE_NAME=healthcare-service
KEYCLOAK_SERVER_URL=http://keycloak:8080
KEYCLOAK_REALM=superapp
INTERNAL_TOKEN_SECRET=change-me-internal-secret
KEYCLOAK_ADMIN=admin
KEYCLOAK_ADMIN_PASSWORD=admin