Files
kami-db-migrate/Dockerfile
danial 0287e64200 feat(migration): 改用版本化迁移管理数据库变更
- 将声明式 schema.sql 改为期望状态定义
- 新增 migrations/ 目录存放版本化迁移文件
- 更新 atlas.hcl 配置支持版本化迁移路径
- 修改生成迁移脚本 generate-migration.sh 实现差异迁移文件生成
- Dockerfile 支持拷贝 migrations 目录
- docker-compose.yml 调整命令,使用迁移文件夹路径
- 优化 README 文档描述版本化迁移及使用步骤
- 移除无用测试数据库docker-compose.test.yml文件
- 添加初始的 baseline 迁移 SQL 文件,包含完整表结构创建语句
2025-12-14 14:43:23 +08:00

12 lines
259 B
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

FROM arigaio/atlas:latest-alpine
# 设置工作目录,迁移目录通常会挂载到这里
WORKDIR /app
COPY atlas.hcl .
COPY schema.sql .
COPY migrations/ ./migrations/
# 设置 ENTRYPOINT使得容器启动时默认运行 Atlas
ENTRYPOINT ["/atlas"]