Created
January 5, 2021 17:34
-
-
Save chungquantin/af61f5a9170fb157418d8851d03127b6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = { | |
| apps: [ | |
| { | |
| name: "React Typescript GraphQL boilerplate", | |
| script: "src/index.ts", | |
| instances: 2, | |
| cwd: __dirname, | |
| autorestart: true, | |
| max_memory_restart: "1G", | |
| exec_mode: "cluster", | |
| env: { | |
| NODE_ENV: "production", | |
| }, | |
| }, | |
| ], | |
| deploy: { | |
| production: { | |
| host: "xx.yy.zz.vv", | |
| user: "deploy", | |
| ssh_options: ["ForwardAgent=yes"], | |
| ref: "origin/master", | |
| repo: "git@github:repo/repo.git", | |
| path: "/path/to/project", | |
| "post-deploy": | |
| "cd /path/to/project && NODE_ENV=production yarn --production=false;yarn build;pm2 startOrReload ecosystem.config.js", | |
| env: { | |
| NODE_ENV: "production", | |
| }, | |
| }, | |
| staging: { | |
| user: "deploy", | |
| host: "xx.yy.zz.vv", | |
| ref: "origin/develop", | |
| repo: "git@github.com:repo/repo.git", | |
| path: "/path/to/project", | |
| ssh_options: ["PasswordAuthentication=no", "StrictHostKeyChecking=no"], | |
| "post-deploy": | |
| "cd /path/to/project && yarn --production=false;yarn build;pm2 startOrReload ecosystem.config.js", | |
| env: { | |
| NODE_ENV: "production", | |
| }, | |
| }, | |
| }, | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment