Skip to content

Commit

Permalink
add Dockerfile docker-compose .dockerignore process.json files.
Browse files Browse the repository at this point in the history
  • Loading branch information
leoskey committed Apr 20, 2018
1 parent 47fb9bc commit 5d84150
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
node_modules
npm-debug.log
Dockerfile*
docker-compose*
.dockerignore
.git
.gitignore
README.md
LICENSE
.vscode
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM keymetrics/pm2:8-alpine
ENV NODE_ENV production
WORKDIR /usr/src/app
COPY ["package.json", "./"]
RUN yarn --prod -s && mv node_modules ../
COPY . .
EXPOSE 1200
CMD pm2-runtime start process.json
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '2.1'

services:
rsshub:
image: rsshub
container_name: rsshub
build: .
environment:
NODE_ENV: production
ports:
- 1200:1200
11 changes: 11 additions & 0 deletions process.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"apps": [{
"name": "rsshub",
"script": "index.js",
"instances": "max",
"exec_mode": "cluster",
"env": {
"NODE_ENV": "production"
}
}]
}

0 comments on commit 5d84150

Please sign in to comment.