epii-1 commited on
Commit
2032c86
·
1 Parent(s): 9bcde4c
Files changed (1) hide show
  1. docker-entrypoint.sh +6 -2
docker-entrypoint.sh CHANGED
@@ -1,4 +1,5 @@
1
  #!/bin/sh
 
2
 
3
  # 如果配置目录下没有 env 文件,则复制示例文件
4
  if [ ! -f /app/config/env ]; then
@@ -9,5 +10,8 @@ fi
9
  # 创建配置文件软链接
10
  ln -sf /app/config/env /app/.env
11
 
12
- # 启动 Nginx 和后端服务
13
- nginx -g 'daemon off;' & npm run start
 
 
 
 
1
  #!/bin/sh
2
+ set -e
3
 
4
  # 如果配置目录下没有 env 文件,则复制示例文件
5
  if [ ! -f /app/config/env ]; then
 
10
  # 创建配置文件软链接
11
  ln -sf /app/config/env /app/.env
12
 
13
+ # 启动后端服务
14
+ npm run start &
15
+
16
+ # 启动 Nginx(作为主进程)
17
+ exec nginx -g 'daemon off;'