From 537d452727fd90adcc92631dc646e9289cc9deef Mon Sep 17 00:00:00 2001 From: Tom Russell Date: Mon, 18 Mar 2019 21:18:01 +0000 Subject: [PATCH] Add template pm2 ecosystem files --- ecosystem.config.dev-template.js | 28 ++++++++++++++++++++++++++++ ecosystem.config.template.js | 24 ++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 ecosystem.config.dev-template.js create mode 100644 ecosystem.config.template.js diff --git a/ecosystem.config.dev-template.js b/ecosystem.config.dev-template.js new file mode 100644 index 00000000..15dbbc23 --- /dev/null +++ b/ecosystem.config.dev-template.js @@ -0,0 +1,28 @@ +// Template for local development pm2 ecosystem file + +// Copy this file and edit to set up pm2 config +// DO NOT COMMIT details to this file (publicly visible) +// See https://pm2.io/doc/en/runtime/guide/ecosystem-file/ for docs +module.exports = { + apps : [ + { + name: "app", + cwd: "./app", + script: "npm", + args: "start", + env: { + NODE_ENV: "development", + TILECACHE_PATH: "./app/tilecache" + + // update these details in private copy + PGHOST: "hostname", + PGPORT: 5432, + PGDATABASE: "databasename", + PGUSER: "username", + PGPASSWORD: "longrandomsecret", + APP_COOKIE_SECRET: "longrandomsecret", + + } + } + ] + } diff --git a/ecosystem.config.template.js b/ecosystem.config.template.js new file mode 100644 index 00000000..528fffc2 --- /dev/null +++ b/ecosystem.config.template.js @@ -0,0 +1,24 @@ +// Template for production ecosystem file + +// Copy this file and edit to set up pm2 config +// DO NOT COMMIT details to this file (publicly visible) +// See https://pm2.io/doc/en/runtime/guide/ecosystem-file/ for docs +module.exports = { + apps: [ + { + name: "colouringlondon", + script: "./app/build/server.js", + instances: 2, + env: { + NODE_ENV: "production", + PGHOST: "hostname", + PGPORT: 5432, + PGDATABASE: "databasename", + PGUSER: "username", + PGPASSWORD: "longrandomsecret", + APP_COOKIE_SECRET: "longrandomsecret", + TILECACHE_PATH: "/path/to/tile/cache" + } + } + ] +}