chore: bootstrap housing research platform

This commit is contained in:
2026-06-23 09:43:56 +08:00
commit 479e3f16d4
34 changed files with 4339 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
# 环境配置
不要把真实数据库密码写入仓库。开发时在当前 shell 中设置环境变量。
## API
```bash
export DATABASE_URL="postgres://<user>:<password>@<host>:<port>/shanghai_housing_research_dev"
export API_HOST="127.0.0.1"
export API_PORT="8080"
export RUN_MIGRATIONS="true"
```
`RUN_MIGRATIONS=true` 会在 API 启动时运行 `apps/api/migrations` 中的 SQLx migrations。生产环境建议由单独的 migration job 执行。
## 数据库命名
建议使用:
```text
shanghai_housing_research_dev
shanghai_housing_research_test
shanghai_housing_research
```
管理员账户只用于 bootstrap。应用运行建议使用专用低权限账户。