From 2406c68216171d649b2f0d130319b6e75aa317b2 Mon Sep 17 00:00:00 2001 From: Rishi Ghan Date: Thu, 28 Oct 2021 11:54:20 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Updated=20LIBRARY=5FSOCKET=5FHOS?= =?UTF-8?q?T?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.env | 1 + docker-compose.yml | 1 - src/client/constants/endpoints.ts | 2 +- webpack.config.js | 3 +++ 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docker-compose.env b/docker-compose.env index e69de29..a71250e 100644 --- a/docker-compose.env +++ b/docker-compose.env @@ -0,0 +1 @@ +LIBRARY_SOCKET_HOST=ws://importapi:3001 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 0feaa0b..7911eb3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -78,7 +78,6 @@ services: - "3001:3001" environment: SERVICES: api - DOCKER_RABBITMQ_CONNECTION_STRING: 'amqp://user:bitnami@rabbitmq:5672' labels: - "traefik.enable=true" - "traefik.http.routers.threetwo-import-api.rule=Host(`localhost`)" diff --git a/src/client/constants/endpoints.ts b/src/client/constants/endpoints.ts index 02745e4..c021c6e 100644 --- a/src/client/constants/endpoints.ts +++ b/src/client/constants/endpoints.ts @@ -38,7 +38,7 @@ export const IMPORT_SERVICE_BASE_URI = hostURIBuilder({ export const SOCKET_BASE_URI = hostURIBuilder({ protocol: "http", - host: process.env.DOCKER_HOST || "localhost", + host: process.env.LIBRARY_SOCKET_HOST || "localhost", port: "3001", apiPath: `/`, }); diff --git a/webpack.config.js b/webpack.config.js index 5d82061..e9fc58c 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -99,6 +99,9 @@ module.exports = (env) => { }), new webpack.DefinePlugin({ "process.env.DOCKER_HOST": JSON.stringify(process.env.DOCKER_HOST), + "process.env.LIBRARY_SOCKET_HOST": JSON.stringify( + process.env.LIBRARY_SOCKET_HOST, + ), }), new MiniCssExtractPlugin({ filename: "./css/[name].css",