forked from DIYgod/RSSHub
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 改进Docker的使用方式(DIYgod#271) * ignore npm lockfile, config dir desc file * Accept with the advice of the maintainer
- Loading branch information
Showing
6 changed files
with
13,296 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,6 @@ error.log | |
combined.log | ||
.vscode | ||
docs/.vuepress/dist | ||
|
||
config/app.json | ||
config/config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
package.json | ||
docs/.vuepress/dist | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
FROM keymetrics/pm2:8-alpine | ||
FROM node:10.3.0-slim | ||
|
||
MAINTAINER soulteary<[email protected]> | ||
|
||
ENV NODE_ENV production | ||
|
||
WORKDIR /usr/src/app | ||
COPY ["package.json", "./"] | ||
RUN yarn --ignore-engines --prod -s && mv node_modules ../ | ||
COPY . . | ||
EXPOSE 1200 | ||
CMD pm2-runtime start process.json | ||
|
||
ADD ./package.json . | ||
|
||
ARG USE_CHINA_NPM_REGISTRY=0 | ||
RUN if [ "$USE_CHINA_NPM_REGISTRY" = 1 ]; then echo 'use npm mirror'; npm install --production --vb --registry=https://registry.npm.taobao.org; else npm install --production; fi; | ||
|
||
ADD . . |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,35 @@ | ||
version: '2.1' | ||
|
||
services: | ||
|
||
rsshub: | ||
build: | ||
dockerfile: ./Dockerfile | ||
context: . | ||
args: | ||
# 是否在构建过程中使用淘宝NPM源进行加速 | ||
USE_CHINA_NPM_REGISTRY: 0 | ||
restart: always | ||
image: rsshub | ||
container_name: rsshub | ||
build: . | ||
ports: | ||
- 1200:1200 | ||
environment: | ||
NODE_ENV: production | ||
CACHE_TYPE: redis | ||
REDIS_URL: 'redis://redis:6379/' | ||
ports: | ||
- 1200:1200 | ||
command: node index.js | ||
links: | ||
- redis | ||
volumes: | ||
- ./config/app.json:/usr/src/app/app.json | ||
- ./config/config.js:/usr/src/app/config.json | ||
depends_on: | ||
- redis | ||
|
||
redis: | ||
image: redis:alpine | ||
image: redis:4.0.9-alpine | ||
volumes: | ||
- redis-data:/data | ||
- redis-data:/data | ||
|
||
volumes: | ||
redis-data: |
Oops, something went wrong.