Skip to content

Instantly share code, notes, and snippets.

@AndrewBuntsev
Last active November 30, 2019 03:11
Show Gist options
  • Save AndrewBuntsev/969b39951e5e0063246f0de6e29cbf5e to your computer and use it in GitHub Desktop.
Save AndrewBuntsev/969b39951e5e0063246f0de6e29cbf5e to your computer and use it in GitHub Desktop.
PM2 ecosystem file
module.exports = {
apps: [{
name: 'Exercise Tracker',
cwd: './boilerplate-exercisetracker',
script: './server.js',
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '70M',
exp_backoff_restart_delay: 100,
env: {
'PORT': 10119
}
},
{
name: 'File Metadata',
cwd: './boilerplate-project-filemetadata',
script: './server.js',
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '70M',
exp_backoff_restart_delay: 100,
env: {
'PORT': 5919
}
},
{
name: 'URL Shortener',
cwd: './boilerplate-project-urlshortener',
script: './server.js',
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '70M',
exp_backoff_restart_delay: 100,
env: {
'PORT': 3050
}
},
{
name: 'Phoenix Orion (backend)',
cwd: './phoenix-pres-centre',
script: './server/server.js',
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '1G',
exp_backoff_restart_delay: 100,
append_env_to_name: true,
env: {
'PORT': 51000,
'ENVIRONMENT': 'LOCAL',
'NODE_ENV': 'development'
}
},
{
name: 'Phoenix Orion (Frontend)',
cwd: './phoenix-pres-centre/client',
script: './node_modules/react-scripts/scripts/start.js',
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '1G',
exp_backoff_restart_delay: 100,
append_env_to_name: true,
env: {
'PORT': 8080,
'REACT_APP_ENVIRONMENT': 'LOCAL',
'NODE_ENV': 'development',
'REACT_APP_SERVER_URL': 'http://server.andreibuntsev.com:51000',
'HTTPS': false
}
}
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment