feat: 容器启动时自动执行数据库迁移

- 添加 entrypoint.sh 在容器启动前执行 alembic upgrade head
- 更新 Dockerfile.app 和 Dockerfile.app.local 使用新入口脚本
- 移除手动迁移脚本 migrate.sh
- 简化 README 部署说明
This commit is contained in:
fawney19
2026-01-08 01:28:36 +08:00
parent 59447fc12b
commit 68ff828505
5 changed files with 20 additions and 20 deletions

8
entrypoint.sh Normal file
View File

@@ -0,0 +1,8 @@
#!/bin/bash
set -e
echo "Running database migrations..."
alembic upgrade head
echo "Starting application..."
exec "$@"