# 公寓端本地运行环境变量模板(IT-0 / IT-1 / IT-2) # 用法:复制为 dev/.env 后填写真实值。 # .env 已被 .gitignore 忽略,禁止提交;本模板不得写入任何真实口令。 # 严禁把明文口令写入数据库配置文件、CI 脚本或提交记录。 # 填好 APT_DB_PASSWORD 后执行: # powershell -ExecutionPolicy Bypass -File dev/scripts/apply-it2-sql.ps1 # 无凭据时可先预览:追加 -DryRun # ---- MySQL(apt_rev01)---- APT_DB_HOST=127.0.0.1 APT_DB_PORT=3306 APT_DB_NAME=apt_rev01 APT_DB_USER=iotlocks APT_DB_PASSWORD= # ---- Redis ---- APT_REDIS_HOST=127.0.0.1 APT_REDIS_PORT=6379 APT_REDIS_DB=1 APT_REDIS_PASSWORD= APT_REDIS_KEY_PREFIX=apt:rev01: # ---- JWT ---- # TokenService.signWith(HS512, secret) requires a Base64-encoded key whose decoded # length is at least 64 bytes. Plain text / hex / placeholder text causes # ArrayIndexOutOfBoundsException on login. # PowerShell generation example: # $b = New-Object byte[] 64 # (New-Object System.Security.Cryptography.RNGCryptoServiceProvider).GetBytes($b) # [Convert]::ToBase64String($b) APT_TOKEN_SECRET== 64 bytes> # ---- Apartment identity (D5: one process, one gyid) ---- APT_GY_ID=APT-REV01-001 # ---- Runtime ---- APT_HTTP_PORT=8080 APT_UPLOAD_PATH=./uploadPath APT_PROBE_ENABLED=true APT_PROBE_TIMEOUT_MS=2000 # Table 9-16: Mock master downlink is only allowed with Spring profile 'local'. # Keep false in production; a non-local profile with true fails startup. APT_MASTER_CLIENT_MOCK=false # ---- SIP voice / AMI (disabled by default) ---- # Master switch; AMI host/port/user/timeouts live in table apt_ast_instance. # Keep false until a reachable Asterisk exists — false means "no connection, no SIP call", # and the scan task only handles the tablet chain. APT_VOICE_ENABLED=false # Auto-dial when jcsj is due; false = only manual POST /apt/jcxx/{jcid}/dial APT_VOICE_SIP_CALL_ENABLED=true # Duty desk extensions (second leg), comma separated, e.g. 1002,1003; empty = room leg only APT_VOICE_DUTY_EXTENSIONS= APT_VOICE_TTS_CONTEXT=apt-tts APT_VOICE_TTS_EXTENSION=s APT_VOICE_TTS_MEDIA_PREFIX=apt/call-prompt APT_VOICE_DIAL_TIMEOUT_MS=30000 # ---- AMI secret (process env only) ---- # apt_ast_instance.ami_secret_ref stores the VARIABLE NAME only (default APT_AMI_SECRET). # The value must match manager.conf accounts; it is never written to DB, logs or git. # Missing value -> AmiException(AMI_CONFIG_MISSING), instance stays DOWN, startup is unaffected. APT_AMI_SECRET= # ---- Device auth for /open/v1/** ---- # Production must keep true; local debugging may set false (only X-Device-Code is checked). APT_DEVICE_HMAC_ENABLED=true APT_DEVICE_HMAC_SECRET= # ---- Local debug endpoints (/apt/local/**, must stay false in production) ---- # true exposes: inject #7 match verdict, inject AMI events (bypasses real entry points). APT_DEBUG_ENABLED=false # ---- Tablet face photo storage (paths only in DB, image on disk/OSS) ---- # Writable directory; DB stores relative path face/{gyid}/{yyyy}/{MM}/{dd}/{jcid}/{photoId}.jpg APT_PHOTO_ROOT=./data/apt-photos # Per-file limit in bytes (must be <= spring.servlet.multipart.max-file-size, currently 10MB) APT_PHOTO_MAX_BYTES=5242880 # Prefix used only when echoing a URL back to the tablet APT_PHOTO_PUBLIC_PREFIX=/apt/files APT_PHOTO_STORAGE_TARGET=LOCAL # Retention: photo records and files older than N days are purged daily at 03:30 # (business cap = 1 month; keep default 30 unless ops asks otherwise) APT_PHOTO_RETENTION_DAYS=30 APT_PHOTO_PURGE_BATCH=200 # ---- Druid console (disabled by default) ---- APT_DRUID_CONSOLE=false APT_DRUID_USER=aptadmin APT_DRUID_PASSWORD=