37c103fa20
- Register and login by mobile number; email is now an optional contact field only (never used to authenticate) - After registration, the phone is verified via a 6-digit SMS code - Login supports both password and one-time-code (OTP) methods - Phone OTP delivered via Kavenegar (verify/lookup); API key in env - Account page: edit name/optional email, change password, and change mobile number with OTP re-verification - Codes are hashed, expire in 5m, capped at 5 attempts, rate-limited - Seed gives the admin a verified phone so mobile login still works Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
70 lines
2.4 KiB
Bash
70 lines
2.4 KiB
Bash
# Environment
|
|
NODE_ENV=development
|
|
PORT=4000
|
|
|
|
|
|
# Database
|
|
DB_HOST=localhost
|
|
DB_PORT=5432
|
|
DB_USERNAME=cloudhost
|
|
DB_PASSWORD=cloudhost_secret
|
|
DB_DATABASE=cloudhost
|
|
|
|
# JWT
|
|
JWT_SECRET=your-super-secret-jwt-key-change-in-production
|
|
JWT_EXPIRES_IN=1h
|
|
JWT_REFRESH_SECRET=your-refresh-secret-key-change-in-production
|
|
JWT_REFRESH_EXPIRES_IN=7d
|
|
|
|
# Redis
|
|
REDIS_HOST=localhost
|
|
REDIS_PORT=6379
|
|
|
|
# OTP SMS — Kavenegar (verify/lookup template API)
|
|
# Create an approved OTP template in the Kavenegar panel and put its name here.
|
|
# The template must contain a single %token placeholder for the code.
|
|
KAVENEGAR_API_KEY=
|
|
KAVENEGAR_OTP_TEMPLATE=
|
|
# Without these, OTP codes are logged to the API console in development only.
|
|
|
|
# Seed admin mobile (login is mobile-only) — used by `npm run seed`.
|
|
ADMIN_PHONE=09120000000
|
|
|
|
# In-cluster Docker Registry (Kaniko push + app image pull — same URL)
|
|
REGISTRY_URL=registry.cloudhost-builds.svc.cluster.local:5000
|
|
# REGISTRY_PULL_URL=registry.cloudhost-builds.svc.cluster.local:5000
|
|
REGISTRY_USERNAME=admin
|
|
REGISTRY_PASSWORD=registry_secret
|
|
|
|
# Central logging (Elasticsearch + Kibana)
|
|
# In-cluster backend: leave ELASTICSEARCH_HOST unset (uses elasticsearch.logging.svc.cluster.local).
|
|
# Local backend (npm run dev): defaults to 127.0.0.1 and auto-runs kubectl port-forward to the default cluster.
|
|
# ELASTICSEARCH_HOST=127.0.0.1
|
|
# ELASTICSEARCH_PORT=9200
|
|
# ELASTICSEARCH_AUTO_PORT_FORWARD=false
|
|
# ELASTIC_PASSWORD=CloudHost2024!Secure
|
|
# KIBANA_SYSTEM_PASSWORD=Kibana2024!System
|
|
# LOGGING_ELASTICSEARCH_IMAGE=localhost:30500/elasticsearch:8.12.0
|
|
# LOGGING_KIBANA_IMAGE=localhost:30500/kibana:8.12.0
|
|
|
|
# Build
|
|
BUILD_NAMESPACE=cloudhost-builds
|
|
BUILD_SERVICE_ACCOUNT=kaniko-builder
|
|
|
|
# Platform
|
|
PLATFORM_DOMAIN=apps.cloudhost.local
|
|
# Base domain for per-user preview URLs (<userId>-<7-digit>.<base-domain>).
|
|
# Falls back to the root domain derived from FRONTEND_URL when unset.
|
|
# PREVIEW_BASE_DOMAIN=3fase.ir
|
|
# Ingress controller class for app Ingress + ACME HTTP-01 solver.
|
|
# k3s default is Traefik; use "nginx" only on clusters running ingress-nginx.
|
|
# INGRESS_CLASS=traefik
|
|
UPLOAD_DIR=./uploads
|
|
# PVC resize: use a dynamic StorageClass with allowVolumeExpansion (k3s: rancher.io/local-path)
|
|
# k3s: use local-path and skip creating a custom class (set CREATE=false)
|
|
# PLATFORM_STORAGE_CLASS=local-path
|
|
# PLATFORM_CREATE_STORAGE_CLASS=false
|
|
PLATFORM_STORAGE_CLASS=cloudhost-expandable
|
|
PLATFORM_CREATE_STORAGE_CLASS=true
|
|
PLATFORM_STORAGE_PROVISIONER=rancher.io/local-path
|