Skip to content

Instantly share code, notes, and snippets.

@rafirh
Created July 17, 2023 07:24
Show Gist options
  • Save rafirh/51df56d410783f8e68bb1566b31b6e38 to your computer and use it in GitHub Desktop.
Save rafirh/51df56d410783f8e68bb1566b31b6e38 to your computer and use it in GitHub Desktop.
Ecosytem Config Example
module.exports = {
apps: [{
name: 'app-name',
script: 'build/server.js',
autorestart: true,
watch: false,
max_memory_restart: '2G',
env_development: {
COMMON_VARIABLE: 'true',
PORT: 3000,
instances: 4,
NODE_ENV: 'development',
exec_mode: 'cluster_mode',
watch: true,
},
env_production: {
PORT: 'app-port',
NODE_ENV: 'production',
instances: 30,
exec_mode: 'fork_mode',
watch: false,
},
}],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment