exable324 commited on
Commit
73ad346
·
verified ·
1 Parent(s): ad5e827

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -1
Dockerfile CHANGED
@@ -52,6 +52,9 @@ RUN apt-get update && \
52
  apt-get autoremove -y && \
53
  rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
54
 
 
 
 
55
  # 创建数据目录并设置权限
56
  RUN mkdir -p ./data && \
57
  chown -R user:user $HOME/app && \
@@ -70,4 +73,4 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
70
  CMD curl -f http://localhost:7860/admin/health || exit 1
71
 
72
  # 启动服务
73
- CMD ["./entrypoint.sh"]
 
52
  apt-get autoremove -y && \
53
  rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
54
 
55
+ # 执行数据库迁移
56
+ RUN python scripts/migrate_to_database.py
57
+
58
  # 创建数据目录并设置权限
59
  RUN mkdir -p ./data && \
60
  chown -R user:user $HOME/app && \
 
73
  CMD curl -f http://localhost:7860/admin/health || exit 1
74
 
75
  # 启动服务
76
+ CMD ["./entrypoint.sh"]