2026-11-10 16:44:01 +08:00
|
|
|
|
# 公寓端本地运行环境变量模板(IT-0 / IT-1)
|
|
|
|
|
|
# 用法:复制为 dev/.env(或 dev/scripts/.env)后填写真实值。
|
|
|
|
|
|
# .env 已被 .gitignore 忽略,禁止提交;本模板不得写入任何真实口令。
|
|
|
|
|
|
# 严禁把明文口令写入数据库配置文件、CI 脚本或提交记录。
|
2026-11-10 14:52:54 +08:00
|
|
|
|
|
2026-11-10 16:44:01 +08:00
|
|
|
|
# ---- MySQL(apt_rev01)----
|
2026-11-10 14:52:54 +08:00
|
|
|
|
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 14:52:54 +08:00
|
|
|
|
|
2026-11-10 16:44:01 +08:00
|
|
|
|
# ---- Redis ----
|
2026-11-10 14:52:54 +08:00
|
|
|
|
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 14:52:54 +08:00
|
|
|
|
|
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) ----
|
2026-11-10 14:52:54 +08:00
|
|
|
|
APT_GY_ID=APT-REV01-001
|
2026-11-10 16:44:01 +08:00
|
|
|
|
|
|
|
|
|
|
# ---- Runtime ----
|
2026-11-10 14:52:54 +08:00
|
|
|
|
APT_HTTP_PORT=8080
|
2026-11-10 16:44:01 +08:00
|
|
|
|
APT_UPLOAD_PATH=./uploadPath
|
2026-11-10 14:52:54 +08:00
|
|
|
|
APT_PROBE_ENABLED=true
|
|
|
|
|
|
APT_PROBE_TIMEOUT_MS=2000
|
2026-11-10 16:44:01 +08:00
|
|
|
|
|
|
|
|
|
|
# ---- Druid console (disabled by default) ----
|
2026-11-10 14:52:54 +08:00
|
|
|
|
APT_DRUID_CONSOLE=false
|
|
|
|
|
|
APT_DRUID_USER=aptadmin
|
|
|
|
|
|
APT_DRUID_PASSWORD=
|