diff --git a/dashboard/.gitignore b/dashboard/.gitignore index 265259f..3c80712 100644 --- a/dashboard/.gitignore +++ b/dashboard/.gitignore @@ -24,8 +24,6 @@ winston-*.ndjson .env.* !.env.example -ecosystem.config.js - # Test reports *.report.txt @@ -36,5 +34,7 @@ out.pdf tests # EXPLAINS MONGODB +explains -explains \ No newline at end of file +#Ecosystem +ecosystem.config.js \ No newline at end of file diff --git a/scripts/helpers/deploy-helper.ts b/scripts/helpers/deploy-helper.ts index 9946695..2b4ab30 100644 --- a/scripts/helpers/deploy-helper.ts +++ b/scripts/helpers/deploy-helper.ts @@ -13,7 +13,7 @@ export class DeployHelper { const argvMode = process.argv[2] if (argvMode != '--production' && argvMode != '--testmode') { console.error('use --production or --testmode'); - process.exit(1); + process.exit(0); } const MODE = argvMode === '--production' ? 'production' : 'testmode'; return MODE; diff --git a/scripts/producer/deploy.ts b/scripts/producer/deploy.ts index 68e9122..2644d3b 100644 --- a/scripts/producer/deploy.ts +++ b/scripts/producer/deploy.ts @@ -26,7 +26,8 @@ async function main() { if (MODE === 'testmode') { const ecosystemContent = fs.readFileSync(LOCAL_PATH + '/ecosystem.config.js', 'utf8'); - const devContent = ecosystemContent.replace("redis://litlyx.com", `redis://${REMOTE_HOST_TESTMODE}`); + const REDIS_URL = ecosystemContent.match(/REDIS_URL: ["'](.*?)["']/)[1]; + const devContent = ecosystemContent.replace(REDIS_URL, `redis://${REMOTE_HOST_TESTMODE}`); archive.append(Buffer.from(devContent), { name: '/ecosystem.config.js' }); } else { archive.file(LOCAL_PATH + '/ecosystem.config.js', { name: '/ecosystem.config.js' })