Create entrypoint.sh
Browse files- entrypoint.sh +16 -0
entrypoint.sh
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
set -e
|
| 3 |
+
|
| 4 |
+
echo "[Entrypoint] Starting container setup..."
|
| 5 |
+
|
| 6 |
+
# 步骤 1: 执行数据恢复脚本
|
| 7 |
+
echo "[Entrypoint] Running data restoration script..."
|
| 8 |
+
/app/scripts/restore.sh
|
| 9 |
+
|
| 10 |
+
# 步骤 2: 在后台启动循环备份脚本
|
| 11 |
+
echo "[Entrypoint] Starting background backup process..."
|
| 12 |
+
/app/scripts/backup.sh &
|
| 13 |
+
|
| 14 |
+
# 步骤 3: 启动 AnythingLLM 主应用
|
| 15 |
+
echo "[Entrypoint] Handing over control to AnythingLLM server..."
|
| 16 |
+
exec node /app/server/index.js
|