Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/server/db/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ const { promisify } = require('util');
const key = (...parts) => parts.join(':');

const p = (tgt, method) => promisify(tgt[method]).bind(tgt);

const redisHost = process.env.REDIS_HOST || 'localhost';
const getConnection = () => {
const client = redis.createClient(6379, 'redis');
const client = redis.createClient(6379, redisHost);
const get = p(client, 'get');
const set = p(client, 'set');
const flushdb = p(client, 'flushdb');
Expand Down
1 change: 1 addition & 0 deletions deploy/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ services:
command: ["server:prod"]
environment:
- REACT_APP_HOST
- REDIS_HOST=redis
depends_on:
- redis
networks:
Expand Down
2 changes: 2 additions & 0 deletions dev/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ services:
ports:
- 3001:3001
command: ["server"]
environment:
- REDIS_HOST=redis
volumes:
- ./app:/app
networks:
Expand Down