From 28da3231e9a2d6060276ffbe80de506c4ba388ff Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sun, 7 Nov 2021 10:43:26 -0500 Subject: aaaaaaaaaaaaaaa --- ecosystem.config.cjs | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ ecosystem.config.js | 51 --------------------------------------------------- package.json | 6 +++--- tsconfig.json | 2 +- 4 files changed, 55 insertions(+), 55 deletions(-) create mode 100644 ecosystem.config.cjs delete mode 100644 ecosystem.config.js diff --git a/ecosystem.config.cjs b/ecosystem.config.cjs new file mode 100644 index 0000000..b90eb42 --- /dev/null +++ b/ecosystem.config.cjs @@ -0,0 +1,51 @@ +module.exports = { + apps: [ + { + name: 'bush-bot', + script: 'yarn', + args: 'node --trace-warnings dist/src/bot.js', + out_file: '../bushbot.log', + error_file: '../bushbot.log', + max_memory_restart: '1G', + node_args: ['--max_old_space_size=2048'], + env: { + FORCE_COLOR: '3' + }, + exp_backoff_restart_delay: 2500, + wait_ready: true + }, + { + name: 'bush-bot-beta', + script: 'yarn', + args: 'node --trace-warnings dist/src/bot.js', + out_file: '../bushbot-beta.log', + error_file: '../bushbot-beta.log', + max_memory_restart: '1G', + node_args: ['--max_old_space_size=2048'], + env: { + FORCE_COLOR: '3' + }, + exp_backoff_restart_delay: 2500, + wait_ready: true + } + ], + + deploy: { + production: { + 'user': 'pi', + 'host': '192.168.1.210', + 'ref': 'origin/master', + 'repo': 'https://github.com/NotEnoughUpdates/bush-bot.git', + 'path': '/code/bush-bot', + 'post-deploy': 'yarn install && yarn build:tsc && pm2 start ecosystem.config.cjs --only bush-bot' + }, + beta: { + 'user': 'pi', + 'host': '192.168.1.210', + 'ref': 'origin/beta', + 'repo': 'https://github.com/NotEnoughUpdates/bush-bot.git', + 'path': '/code/bush-bot-beta', + 'post-deploy': 'yarn install && yarn build:tsc && pm2 start ecosystem.config.cjs --only bush-bot-beta' + } + } +}; diff --git a/ecosystem.config.js b/ecosystem.config.js deleted file mode 100644 index cbcfc92..0000000 --- a/ecosystem.config.js +++ /dev/null @@ -1,51 +0,0 @@ -module.exports = { - apps: [ - { - name: 'bush-bot', - script: 'yarn', - args: 'node --trace-warnings dist/src/bot.js', - out_file: '../bushbot.log', - error_file: '../bushbot.log', - max_memory_restart: '1G', - node_args: ['--max_old_space_size=2048'], - env: { - FORCE_COLOR: '3' - }, - exp_backoff_restart_delay: 2500, - wait_ready: true - }, - { - name: 'bush-bot-beta', - script: 'yarn', - args: 'node --trace-warnings dist/src/bot.js', - out_file: '../bushbot-beta.log', - error_file: '../bushbot-beta.log', - max_memory_restart: '1G', - node_args: ['--max_old_space_size=2048'], - env: { - FORCE_COLOR: '3' - }, - exp_backoff_restart_delay: 2500, - wait_ready: true - } - ], - - deploy: { - production: { - 'user': 'pi', - 'host': '192.168.1.210', - 'ref': 'origin/master', - 'repo': 'https://github.com/NotEnoughUpdates/bush-bot.git', - 'path': '/code/bush-bot', - 'post-deploy': 'yarn install && yarn build:tsc && pm2 start ecosystem.config.js --only bush-bot' - }, - beta: { - 'user': 'pi', - 'host': '192.168.1.210', - 'ref': 'origin/beta', - 'repo': 'https://github.com/NotEnoughUpdates/bush-bot.git', - 'path': '/code/bush-bot-beta', - 'post-deploy': 'yarn install && yarn build:tsc && pm2 start ecosystem.config.js --only bush-bot-beta' - } - } -}; diff --git a/package.json b/package.json index 031080a..ba1b852 100644 --- a/package.json +++ b/package.json @@ -36,9 +36,9 @@ "format:check": "yarn prettier . --check", "upgrade": "yarn rimraf yarn.lock && yarn cache clean && yarn install && yarn up || true || yarn dlx @yarnpkg/sdks vscode", "beta": "git push && git checkout beta && git merge master && git push && git checkout master", - "deploy:beta": "wsl /bin/bash -c \"pm2 deploy beta\"", - "deploy:production": "wsl /bin/bash -c \"pm2 deploy production\"", - "deploy:all": "yarn beta && wsl /bin/bash -c \"pm2 deploy production && pm2 deploy beta\"" + "deploy:beta": "wsl /bin/bash -c \"pm2 deploy ecosystem.config.cjs beta\"", + "deploy:production": "wsl /bin/bash -c \"pm2 deploy ecosystem.config.cjs production\"", + "deploy:all": "yarn beta && wsl /bin/bash -c \"pm2 deploy ecosystem.config.cjs production && pm2 deploy ecosystem.config.cjs beta\"" }, "dependencies": { "@sentry/node": "^6.14.1", diff --git a/tsconfig.json b/tsconfig.json index b2e5ecd..482709d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -29,6 +29,6 @@ "#root/*": ["./*"] } }, - "include": ["src/**/*.ts", "lib/**/*.ts", "ecosystem.config.js"], + "include": ["src/**/*.ts", "lib/**/*.ts", "ecosystem.config.cjs"], "exclude": ["dist", "node_modules"] } -- cgit