hijnu commited on
Commit
c035293
·
verified ·
1 Parent(s): c911e80

Rename docker-entrypoint.sh to entrypoint.sh

Browse files
docker-entrypoint.sh → entrypoint.sh RENAMED
@@ -1,18 +1,18 @@
1
- #!/bin/sh
2
 
3
  app_data_dir="/home/node/.n8n"
4
 
 
5
  if [ ! -d "$app_data_dir" ]; then
6
  mkdir -p "$app_data_dir"
7
  fi
8
 
9
- # 如果使用非 root 用户
10
  chown -R node:node /home/node
11
 
 
12
  if [ "$#" -gt 0 ]; then
13
- # Got started with arguments
14
  exec "$@"
15
  else
16
- # Got started without arguments
17
  exec n8n
18
  fi
 
1
+ #!/bin/bash
2
 
3
  app_data_dir="/home/node/.n8n"
4
 
5
+ # 检查并创建数据目录
6
  if [ ! -d "$app_data_dir" ]; then
7
  mkdir -p "$app_data_dir"
8
  fi
9
 
10
+ # 设置目录权限
11
  chown -R node:node /home/node
12
 
13
+ # 启动应用,根据传递的参数决定启动方式
14
  if [ "$#" -gt 0 ]; then
 
15
  exec "$@"
16
  else
 
17
  exec n8n
18
  fi