docs: install->play with docker (#4139)

This commit is contained in:
NeverBehave
2020-03-03 01:35:23 +08:00
committed by GitHub
parent 3a3245d5e5
commit df88be98e8
3 changed files with 52 additions and 23 deletions
+22 -23
View File
@@ -1,30 +1,29 @@
version: '3'
services:
rsshub:
image: diygod/rsshub
restart: always
ports:
- '1200:1200'
environment:
NODE_ENV: production
CACHE_TYPE: redis
REDIS_URL: 'redis://redis:6379/'
PUPPETEER_WS_ENDPOINT: 'ws://browserless:3000'
depends_on:
- redis
- browserless
service.rsshub:
image: diygod/rsshub
restart: always
ports:
- "1200:1200"
environment:
NODE_ENV: production
CACHE_TYPE: redis
REDIS_URL: 'redis://db.redis:6379/'
PUPPETEER_WS_ENDPOINT: 'ws://service.browserless:3000'
depends_on:
- db.redis
- service.browserless
browserless:
image: browserless/chrome
restart: always
service.browserless:
image: browserless/chrome
restart: always
db.redis:
image: redis:alpine
restart: always
volumes:
- redis-data:/data
redis:
image: redis:alpine
restart: always
volumes:
- redis-data:/data
volumes:
redis-data:
redis-data:
+15
View File
@@ -21,6 +21,21 @@ Deploy for public access may require:
1. [Heroku](https://devcenter.heroku.com/articles/getting-started-with-nodejs)
1. [Google App Engine](https://cloud.google.com/appengine/)
## Play with Docker
If you would like to test routes or avoid IP limits, etc., you may build your own RSSHub for free by clicking the button below.
[![Try in PWD](https://raw.githubusercontent.com/play-with-docker/stacks/master/assets/images/button.png)](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/DIYgod/RSSHub/master/docker-compose.yml)
::: warning Warning
- [DockerHub](https://hub.docker.com) account required
- [Play with Docker](https://labs.play-with-docker.com/) instance will last for 4 hours at most. It should only be used for testing purpose
- If deploy success but port cannot be auto-deteced,please click the `open port` button on the top and type `1200`
- Sometimes PWD won't work as expected. If you encounter blank screen after `Start`, or some error during initialization, please retry
:::
## Docker Compose Deployment
### Install
+15
View File
@@ -21,6 +21,21 @@ sidebar: auto
1. [Heroku](https://devcenter.heroku.com/articles/getting-started-with-nodejs)
1. [Google App Engine](https://cloud.google.com/appengine/)
## Play with Docker
如果想要测试因为反爬规则导致无法访问的路由,您可以点击下方按钮拉起一套免费,临时,专属于您的 RSSHub
[![Try in PWD](https://raw.githubusercontent.com/play-with-docker/stacks/master/assets/images/button.png)](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/DIYgod/RSSHub/master/docker-compose.yml)
::: warning 注意
- 需要 [DockerHub](https://hub.docker.com) 账号
- [Play with Docker](https://labs.play-with-docker.com/) 一次仅能使用 4 小时,不能作为持久化解决方案,应当用于测试/验证路由规则
- 如果部署完成后不能看到自动识别的端口,请手动点击顶部按钮`open port`并输入`1200`
- 有的时候 PWD 会抽风,如果遇到点击`Start`后空白页面,或者拉起失败,请重试
:::
## Docker Compose 部署
### 安装