File size: 588 Bytes
05d00d1
 
 
 
 
 
 
420c7cb
 
 
05d00d1
 
 
 
 
420c7cb
 
 
 
05d00d1
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/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