Skip to content

Commit

Permalink
README作成&make微修正
Browse files Browse the repository at this point in the history
  • Loading branch information
Dragon-taro committed Feb 10, 2019
1 parent 59e606c commit 29b7ec3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
17 changes: 12 additions & 5 deletions redis-pubsub/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
build:
ws/build:
docker build ./ -t websocket

run:
ws/run:
docker run -it --rm -d --name websocket --link redis:redis -p 3000:3000 websocket

kill:
ws/kill:
docker kill websocket

exec:
docker exec -it websocket /bin/bash
ws/exec:
docker exec -it websocket /bin/bash

start: server/static/js/bundle.js
docker-compose up -d

server/static/js/bundle.js:
npm i
npm run build
12 changes: 12 additions & 0 deletions redis-pubsub/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# redisのPub/Subを試してみた

## 概要
websocketを実装したnodeのサーバーが3000ポートと3001ポートでlistenするコンテナの中に立ち上がり、それらをPub/Subで繋ぐredisのコンテナも作られます。

異なるコンテナ間でのwsの同期が実現できます。

## 動かし方

```
make start
```

0 comments on commit 29b7ec3

Please sign in to comment.