From acca2037b497149000f47982f5aacfd48884422e Mon Sep 17 00:00:00 2001 From: Rishi Ghan Date: Wed, 27 Oct 2021 18:44:56 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Troubleshooting=20hostname=20iss?= =?UTF-8?q?ues?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 3 ++- src/client/store/index.ts | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index f81cc70..8388178 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,9 +19,9 @@ services: ports: - "8050:8050" - "3050:3050" - - "8051:8051" depends_on: - db + - redis - nats - traefik - importapi @@ -75,6 +75,7 @@ services: container_name: threetwo-import-api ports: - "3000:3000" + - "3001:3001" environment: SERVICES: api DOCKER_RABBITMQ_CONNECTION_STRING: 'amqp://user:bitnami@rabbitmq:5672' diff --git a/src/client/store/index.ts b/src/client/store/index.ts index c413440..47db5ec 100644 --- a/src/client/store/index.ts +++ b/src/client/store/index.ts @@ -5,8 +5,8 @@ import thunk from "redux-thunk"; import createRootReducer from "../reducers"; import socketIO from "socket.io-client"; import socketIoMiddleware from "redux-socket.io-middleware"; - -const io = socketIO(`http://localhost:3001`); +const socketHostURI = `${process.env.HOSTNAME}:3001` || `http://localhost:3001`; +const io = socketIO(socketHostURI); export const history = createBrowserHistory(); const configureStore = (initialState) => { const store = createStore(