Update start.sh
Browse files
start.sh
CHANGED
|
@@ -1,5 +1,13 @@
|
|
| 1 |
#!/bin/sh
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
nginx
|
| 4 |
-
|
| 5 |
-
|
|
|
|
|
|
| 1 |
#!/bin/sh
|
| 2 |
+
set -e
|
| 3 |
+
|
| 4 |
+
cd /app
|
| 5 |
+
|
| 6 |
+
# 测试 Nginx 配置是否正确
|
| 7 |
+
nginx -t
|
| 8 |
+
|
| 9 |
+
# 启动 Nginx(后台运行)
|
| 10 |
nginx
|
| 11 |
+
|
| 12 |
+
# 启动 PM2(前台运行)
|
| 13 |
+
exec pm2-runtime start ecosystem.config.js
|