refactored monorepo for more projects

This commit is contained in:
Boki 2025-06-22 23:48:01 -04:00
parent 4632c174dc
commit 9492f1b15e
180 changed files with 1438 additions and 424 deletions

View file

@ -0,0 +1,72 @@
module.exports = {
apps: [
{
name: 'stock-ingestion',
script: './data-ingestion/dist/index.js',
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '1G',
env: {
NODE_ENV: 'production',
PORT: 2001
},
env_development: {
NODE_ENV: 'development',
PORT: 2001
}
},
{
name: 'stock-pipeline',
script: './data-pipeline/dist/index.js',
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '1G',
env: {
NODE_ENV: 'production',
PORT: 2002
},
env_development: {
NODE_ENV: 'development',
PORT: 2002
}
},
{
name: 'stock-api',
script: './web-api/dist/index.js',
instances: 2,
autorestart: true,
watch: false,
max_memory_restart: '1G',
exec_mode: 'cluster',
env: {
NODE_ENV: 'production',
PORT: 2003
},
env_development: {
NODE_ENV: 'development',
PORT: 2003
}
}
],
deploy: {
production: {
user: 'deploy',
host: 'production-server',
ref: 'origin/master',
repo: 'git@github.com:username/stock-bot.git',
path: '/var/www/stock-bot',
'post-deploy': 'cd apps/stock && npm install && npm run build && pm2 reload ecosystem.config.js --env production'
},
staging: {
user: 'deploy',
host: 'staging-server',
ref: 'origin/develop',
repo: 'git@github.com:username/stock-bot.git',
path: '/var/www/stock-bot-staging',
'post-deploy': 'cd apps/stock && npm install && npm run build && pm2 reload ecosystem.config.js --env development'
}
}
};