浏览代码

replace pm2 deploy commands by a simple yarn alias

Olivier Massot 4 年之前
父节点
当前提交
acae629c39
共有 3 个文件被更改,包括 8 次插入24 次删除
  1. 6 1
      README.md
  2. 1 21
      ecosystem.config.js
  3. 1 2
      package.json

+ 6 - 1
README.md

@@ -66,10 +66,15 @@ On sauvegarde la nouvelle configuration avec:
 
 ### Mettre à jour
 
-Se place dans le répertoire de l'application, puis lancer:
+Se placer dans le répertoire de l'application, puis lancer:
+
+    yarn deploy
+
+Cette commande est un alias qui équivaut à lancer:
 
     git pull
     yarn install
+    yarn build
     pm2 restart
 
 ## Autres

+ 1 - 21
ecosystem.config.js

@@ -9,25 +9,5 @@ module.exports = {
       script: 'yarn',
       args: 'start'
     }
-  ],
-
-  // Deployment Configuration
-  deploy: {
-    prod: {
-      user: 'exploitation',
-      host: [''],
-      ref: 'origin/master',
-      repo: 'git@gitlab.2iopenservice.com:opentalent/admin.git',
-      path: '/var/opentalent/git/app',
-      'post-deploy': 'yarn install && yarn build && pm2 start app'
-    },
-    preprod: {
-      user: 'exploitation',
-      host: ['preprod-v2'],
-      ref: 'origin/master',
-      repo: 'git@gitlab.2iopenservice.com:opentalent/admin.git',
-      path: '/var/opentalent/git/app',
-      'post-deploy': 'yarn install && yarn build && pm2 start app'
-    }
-  }
+  ]
 }

+ 1 - 2
package.json

@@ -15,8 +15,7 @@
     "start:local": "yarn start --dotenv .env.local",
     "start:preprod": "yarn start --dotenv .env.preprod",
     "start:prod": "yarn start --dotenv .env.prod",
-    "deploy:preprod": "pm2 deploy preprod",
-    "deploy:prod": "pm2 deploy prod",
+    "deploy": "git pull && yarn install && yarn build && pm2 start app",
     "lint:js": "eslint --ext .js,.vue --ignore-path .gitignore .",
     "lint": "yarn lint:js",
     "test": "jest",