Skip to content

Commit

Permalink
update image to use pm2
Browse files Browse the repository at this point in the history
  • Loading branch information
nassim committed Sep 14, 2018
1 parent 8f0fa18 commit 4382e9c
Show file tree
Hide file tree
Showing 4 changed files with 2,571 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
@@ -1,9 +1,9 @@
FROM node:6
FROM keymetrics/pm2:6-jessie

RUN groupadd -r app && useradd -r -g app app

ADD . /var/www
WORKDIR /var/www

RUN npm install --no-optional
CMD ["npm", "start"]
CMD [ "pm2-runtime", "start", "ecosystem.config.js" ]
40 changes: 40 additions & 0 deletions ecosystem.config.js
@@ -0,0 +1,40 @@
module.exports = {
apps : [{
name: "loadDHT",
script: "./loadDHT.js",
env: {
NODE_ENV: "development",
},
env_production: {
NODE_ENV: "production",
}
}, {
name: "loadTorrent",
script: "./loadTorrent.js",
args: "--watch",
env: {
NODE_ENV: "development",
},
env_production: {
NODE_ENV: "production",
}
}, {
name: "categorize",
script: "./categorize.js",
env: {
NODE_ENV: "development",
},
env_production: {
NODE_ENV: "production",
}
}, {
name: "crawlDHT",
script: "./crawlDHT.js",
env: {
NODE_ENV: "development",
},
env_production: {
NODE_ENV: "production",
}
}]
}

0 comments on commit 4382e9c

Please sign in to comment.