Skip to content

Commit

Permalink
docs: install->play with docker (DIYgod#4139)
Browse files Browse the repository at this point in the history
  • Loading branch information
NeverBehave authored and lotosbin committed Mar 3, 2020
1 parent 91450e2 commit a9c2cce
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 23 deletions.
45 changes: 22 additions & 23 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 15 additions & 0 deletions docs/en/install/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 15 additions & 0 deletions docs/install/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 部署

### 安装
Expand Down

0 comments on commit a9c2cce

Please sign in to comment.