add redis to docker-compose.yml
This commit is contained in:
parent
8720797744
commit
a88390a7d1
@ -12,7 +12,7 @@ module.exports = function (app, db) {
|
||||
|
||||
var io = socketio(config.socketPort, { transports: ['websocket', 'polling'] });
|
||||
var redis = require('socket.io-redis');
|
||||
io.adapter(redis({ host: '127.0.0.1', port: 6379 }));
|
||||
io.adapter(redis(process.env.REDIS_HOST || { host: '127.0.0.1', port: 6379 }));
|
||||
|
||||
// Add an event listener to the 'connection' event
|
||||
io.on('connection', function (socket) {
|
||||
|
||||
@ -7,6 +7,9 @@ services:
|
||||
- "27017:27017"
|
||||
volumes:
|
||||
- mongo-data-wt:/data/db
|
||||
redis:
|
||||
image: redis
|
||||
|
||||
web:
|
||||
build: .
|
||||
volumes:
|
||||
@ -17,8 +20,10 @@ services:
|
||||
- "35729:35729"
|
||||
links:
|
||||
- db
|
||||
- redis
|
||||
environment:
|
||||
DB_HOST: db
|
||||
REDIS_HOST: redis
|
||||
volumes:
|
||||
mongo-data-wt:
|
||||
driver: local
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user