aiflow / run.sh
hijnu's picture
Update run.sh
34f01fa verified
raw
history blame
586 Bytes
#!/bin/bash
# 启动 PostgreSQL 服务
/usr/local/bin/docker-entrypoint.sh postgres &
# 检查 PostgreSQL 服务是否已启动
echo "等待 PostgreSQL 服务启动..."
until pg_isready -h localhost; do
sleep 3
done
echo "PostgreSQL 服务已启动!"
# 执行数据库导入脚本
echo "运行数据库导入脚本..."
${WORKDIR}/import-db.sh
sleep 2
export N8N_ENCRYPTION_KEY="n8n8n8n"
# Allows usage of all builtin modules
export NODE_FUNCTION_ALLOW_BUILTIN=*
# Allow usage of external npm modules.
export NODE_FUNCTION_ALLOW_EXTERNAL=*
# 使用绝对路径调用 n8n
exec n8n