File size: 743 Bytes
e1901a2
fd8cdbb
 
 
25d1ac5
 
fd8cdbb
e1901a2
de52305
 
 
 
 
 
 
f11bb20
 
 
 
 
25d1ac5
f11bb20
 
 
25d1ac5
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
echo "============"
whoami
cat /etc/passwd
which python3
which node
echo "============"

# 确保以 postgres 用户身份运行
if [ "$(id -u)" -ne 1000 ]; then
  echo "切换到 UID 为 1000 的 postgres 用户运行"
  exec gosu postgres "$0" "$@"
fi

# 启动 PostgreSQL 服务
docker-entrypoint.sh postgres &

# 检查 PostgreSQL 服务是否已启动
echo "等待 PostgreSQL 服务启动..."
until pg_isready -h localhost; do
  sleep 5
done
echo "PostgreSQL 服务已启动!"

# export N8N_USER_FOLDER=${DATA_DIR}
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