feat: config.php 支持 DB_PATH 环境变量,更新部署文档

- db_path 可通过 DB_PATH 环境变量覆盖,本地默认 server/chat.db
- DEPLOY.md 增加 Docker 部署示例和环境变量说明

2026-05-15
This commit is contained in:
2026-05-15 18:44:53 +08:00
parent 552bfe7e7a
commit a2c0345731
2 changed files with 38 additions and 1 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
<?php
return [
'db_path' => __DIR__ . '/../chat.db',
'db_path' => getenv('DB_PATH') ?: __DIR__ . '/../chat.db',
'jwt_secret' => getenv('JWT_SECRET') ?: 'chat-terminal-secret-key-change-in-production',
'password' => getenv('CHAT_PASSWORD') ?: 'admin',
];