Update Dockerfile
Browse files- Dockerfile +2 -2
Dockerfile
CHANGED
|
@@ -69,5 +69,5 @@ USER user
|
|
| 69 |
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 ["sh", "-c", "if [ ! -f ./data/.migrated ]; then
|
|
|
|
| 69 |
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 ["sh", "-c", "if [ ! -f ./data/.migrated ]; then yes yes | python scripts/migrate_to_database.py && touch ./data/.migrated; fi; ./entrypoint.sh"]
|