Files

48 lines
1.7 KiB
Bash
Raw Permalink Normal View History

2026-11-11 18:30:31 +08:00
# 公寓端本地运行环境变量模板(IT-0 / IT-1 / IT-2)
# 用法:复制为 dev/.env 后填写真实值。
2026-11-10 16:44:01 +08:00
# .env 已被 .gitignore 忽略,禁止提交;本模板不得写入任何真实口令。
# 严禁把明文口令写入数据库配置文件、CI 脚本或提交记录。
2026-11-11 18:30:31 +08:00
# 填好 APT_DB_PASSWORD 后执行:
# powershell -ExecutionPolicy Bypass -File dev/scripts/apply-it2-sql.ps1
# 无凭据时可先预览:追加 -DryRun
2026-11-10 16:44:01 +08:00
# ---- MySQL(apt_rev01)----
APT_DB_HOST=127.0.0.1
APT_DB_PORT=3306
APT_DB_NAME=apt_rev01
APT_DB_USER=iotlocks
2026-11-10 16:44:01 +08:00
APT_DB_PASSWORD=<required: database account password>
2026-11-10 16:44:01 +08:00
# ---- Redis ----
APT_REDIS_HOST=127.0.0.1
APT_REDIS_PORT=6379
APT_REDIS_DB=1
APT_REDIS_PASSWORD=
2026-11-10 16:44:01 +08:00
APT_REDIS_KEY_PREFIX=apt:rev01:
2026-11-10 16:44:01 +08:00
# ---- 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=<required: Base64 HS512 key, decoded length >= 64 bytes>
# ---- Apartment identity (D5: one process, one gyid) ----
APT_GY_ID=APT-REV01-001
2026-11-10 16:44:01 +08:00
# ---- Runtime ----
APT_HTTP_PORT=8080
2026-11-10 16:44:01 +08:00
APT_UPLOAD_PATH=./uploadPath
APT_PROBE_ENABLED=true
APT_PROBE_TIMEOUT_MS=2000
2026-11-11 18:30:31 +08:00
# 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
2026-11-10 16:44:01 +08:00
# ---- Druid console (disabled by default) ----
APT_DRUID_CONSOLE=false
APT_DRUID_USER=aptadmin
APT_DRUID_PASSWORD=