-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
59e606c
commit 29b7ec3
Showing
2 changed files
with
24 additions
and
5 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 |
---|---|---|
@@ -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 |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# redisのPub/Subを試してみた | ||
|
||
## 概要 | ||
websocketを実装したnodeのサーバーが3000ポートと3001ポートでlistenするコンテナの中に立ち上がり、それらをPub/Subで繋ぐredisのコンテナも作られます。 | ||
|
||
異なるコンテナ間でのwsの同期が実現できます。 | ||
|
||
## 動かし方 | ||
|
||
``` | ||
make start | ||
``` |