Przeglądaj źródła

:gear: tweaking post-receive to use pm2

tags/0.0.3^2
j 3 lat temu
rodzic
commit
9f96d9c162
2 zmienionych plików z 5 dodań i 4 usunięć
  1. 1
    0
      backend/server/index.js
  2. 4
    4
      deployment/post-receive

+ 1
- 0
backend/server/index.js Wyświetl plik

@@ -13,6 +13,7 @@ exports.deployment = async ({ start } = {}) => {
13 13
     if (start) {
14 14
         await Exiting.createManager(server).start()
15 15
         server.log(['start'], `Server started at ${server.info.uri}`)
16
+        process.title = 'SIIMEE_API_PROCESS'
16 17
         return server
17 18
     }
18 19
 

+ 4
- 4
deployment/post-receive Wyświetl plik

@@ -1,5 +1,4 @@
1 1
 #!/bin/bash
2
-
3 2
 REPO="/opt/staging/siimee.git"
4 3
 commands=(
5 4
     "cd ${REPO}"
@@ -8,9 +7,9 @@ commands=(
8 7
     "echo no build needed!"
9 8
     "cd ${REPO}/frontend && rm -f ${REPO}/frontend/package-lock.json && npm install"
10 9
     "npm run build"
11
-    "cd ${REPO}/backend && npm run generate && npm run reseed"
10
+    # "cd ${REPO}/backend && npm run generate && npm run reseed"
11
+    "cd ${REPO}/backend && pm2 restart ./server/ i -1 -n siimee_backend"
12 12
 )
13
-
14 13
 steps=(
15 14
     "navigate to project…"
16 15
     "git checkout…"
@@ -18,7 +17,8 @@ steps=(
18 17
     "building backend…"
19 18
     "frontend npm install…"
20 19
     "building frontend…"
21
-    "regenerate db data…"
20
+    # "regenerate db data…"
21
+    "start-up…"
22 22
 )
23 23
 SPAN=92
24 24
 COUNT=0

Ładowanie…
Anuluj
Zapisz