Skip to content

Commit

Permalink
Merge pull request #23 from Xianbei233/master
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
dotkrnl authored Oct 1, 2017
2 parents ab8cf25 + 99dfd22 commit 0111a5e
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@ Install dependencies:

Run `webserver.py` and open http://localhost:5000/ in your browser.

### I love docker

Clone me first

### I love docker

You should have a vps first,then you need to install the docker(More information you can find in official document of Docker)


Clone this project
```
git clone https://github.com/tuna/gdanmaku-server
cd gdanmaku-server
Expand All @@ -29,8 +34,7 @@ docker pull redis:alpine
docker run --name redis -v /var/lib/redis:/data -d redis:alpine
```

Modify `settings.py` or create a `settings_local.py` in the gdanmaku dir, and remember the `REDIS_HOST`
in your settings. Let's say, `myredis`.
Modify `settings.py` or create a `settings_local.py` in the gdanmaku dir(if you want to use it in Wechat, please modify the `WECHAT_TOKEN` in `setting.py`), and remember the `REDIS_HOST`in your settings. Let's say, `myredis`.

Modify `Dockerfile`, you may want to change the `sources.list` part. Next we build the docker image of danmaku:

Expand All @@ -41,19 +45,21 @@ docker build --tag danmaku:dev .
We need to mount the code as volume to the docker container, and link redis to it. Try

```
docker run -it --rm --link redis:myredis -v /path/to/gdanmaku-server:/data/gdanmaku -p 127.0.0.1:5000:5000 danmaku:dev python2 gdanmaku/webserver.py
docker run -it --rm --link redis:myredis -v /path/to/gdanmaku-server:/data/gdanmaku -p IP:Port:5000 danmaku:dev python2 gdanmaku/webserver.py
```
If failed please check the path (use pwd under gdanmaku-server to show the path), then change the path of the command.

Open your browser and visit <http://localhost:5000/>, you should see the danmaku web page.
Open your browser and visit <http://IP:port/>, you should see the danmaku web page.

If you wanna run danmaku service as a daemon, use

```
docker run -d --name danmaku --link redis:myredis -v /path/to/gdanmaku-server:/data/gdanmaku -p 127.0.0.1:5000:5000 danmaku:dev python2 gdanmaku/webserver.py
docker run -d --name danmaku --link redis:myredis -v /path/to/gdanmaku-server:/data/gdanmaku -p IP:Port:5000 danmaku:dev python2 gdanmaku/webserver.py
```

If you want to use it in Wechat, please set the port to 80, and open the firewall.

Good luck, and have fun!

## Client

The official desktop client is available at https://github.com/tuna/danmaQ

0 comments on commit 0111a5e

Please sign in to comment.