From 58dbbd30ad744f28f54aefd8218218fd0e7763ed Mon Sep 17 00:00:00 2001 From: "James A. Joy" Date: Tue, 9 Jun 2020 21:19:36 +0000 Subject: [PATCH] added docker file --- Dockerfile | 16 ++++++++++++++++ ecosystem.config.js | 12 ++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 Dockerfile create mode 100644 ecosystem.config.js diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c497a30 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM keymetrics/pm2:latest-stretch + +# Bundle APP files +COPY src src/ +COPY package.json . +COPY ecosystem.config.js . + +# Install app dependencies +ENV NPM_CONFIG_LOGLEVEL warn +RUN npm install --production + +# Expose the listening port of your app +EXPOSE 4000 + +# Show current folder structure in logs +CMD [ "pm2-runtime", "start", "ecosystem.config.js" ] diff --git a/ecosystem.config.js b/ecosystem.config.js new file mode 100644 index 0000000..f32f8c5 --- /dev/null +++ b/ecosystem.config.js @@ -0,0 +1,12 @@ +module.exports = { + apps : [{ + name: "tentacle", + script: "./src/index.js", + env: { + NODE_ENV: "development", + }, + env_production: { + NODE_ENV: "production", + } + }] +}