Skip to content

Commit

Permalink
Merge pull request #51 from joyja/docker
Browse files Browse the repository at this point in the history
added docker file
  • Loading branch information
joyja committed Jun 10, 2020
2 parents 777e4d4 + 58dbbd3 commit 6685a5d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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" ]
12 changes: 12 additions & 0 deletions ecosystem.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
apps : [{
name: "tentacle",
script: "./src/index.js",
env: {
NODE_ENV: "development",
},
env_production: {
NODE_ENV: "production",
}
}]
}

0 comments on commit 6685a5d

Please sign in to comment.