wiki / entrypoint.sh
gaojintao01
yh
420c7cb
raw
history blame contribute delete
588 Bytes
#!/bin/bash
set -e
echo "[Entrypoint] Starting container setup..."
# 步骤 1: 执行数据恢复脚本
echo "[Entrypoint] Running data restoration script..."
if ! /app/scripts/restore.sh; then
echo "[Error] Data restoration failed, but continuing with startup..."
fi
# 步骤 2: 在后台启动循环备份脚本
echo "[Entrypoint] Starting background backup process..."
/app/scripts/backup.sh &
# 步骤 3: 等待备份进程启动
sleep 2
# 步骤 4: 启动 AnythingLLM 主应用
echo "[Entrypoint] Handing over control to AnythingLLM server..."
exec node /app/server/index.js