From efe5416e5f874363b06d1f2d5eb98f7728aaf092 Mon Sep 17 00:00:00 2001 From: Rishi Ghan Date: Mon, 1 Nov 2021 09:35:33 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=B3=20Removed=20the=20duplicated=20env?= =?UTF-8?q?=20var?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.env | 1 - docker-compose.yml | 2 +- src/client/constants/endpoints.ts | 8 ++++---- webpack.config.js | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) delete mode 100644 docker-compose.env diff --git a/docker-compose.env b/docker-compose.env deleted file mode 100644 index 508f4f1..0000000 --- a/docker-compose.env +++ /dev/null @@ -1 +0,0 @@ -DOCKER_HOST=rook \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 1e3fb54..be907ce 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,7 @@ services: container_name: threetwo-ui env_file: ./docker-compose.env environment: - DOCKER_HOST: rook + UNDERLYING_HOSTNAME: rook restart: unless-stopped ports: - "8050:8050" diff --git a/src/client/constants/endpoints.ts b/src/client/constants/endpoints.ts index c021c6e..1dd7653 100644 --- a/src/client/constants/endpoints.ts +++ b/src/client/constants/endpoints.ts @@ -11,27 +11,27 @@ export const hostURIBuilder = (options: Record): string => { export const COMICBOOKINFO_SERVICE_URI = hostURIBuilder({ protocol: "http", - host: process.env.DOCKER_HOST || "localhost", + host: process.env.UNDERLYING_HOSTNAME || "localhost", port: "3080", apiPath: "/api/comicvine", }); export const API_BASE_URI = hostURIBuilder({ protocol: "http", - host: process.env.DOCKER_HOST || "localhost", + host: process.env.UNDERLYING_HOSTNAME || "localhost", port: "8050", apiPath: "/api", }); export const IMPORT_SERVICE_HOST = hostURIBuilder({ protocol: "http", - host: process.env.DOCKER_HOST || "localhost", + host: process.env.UNDERLYING_HOSTNAME || "localhost", port: "3000", apiPath: ``, }); export const IMPORT_SERVICE_BASE_URI = hostURIBuilder({ protocol: "http", - host: process.env.DOCKER_HOST || "localhost", + host: process.env.UNDERLYING_HOSTNAME || "localhost", port: "3000", apiPath: "/api/import", }); diff --git a/webpack.config.js b/webpack.config.js index 5d82061..6cee908 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -98,7 +98,7 @@ module.exports = (env) => { title: "express-typescript-react", }), new webpack.DefinePlugin({ - "process.env.DOCKER_HOST": JSON.stringify(process.env.DOCKER_HOST), + "process.env.UNDERLYING_HOSTNAME": JSON.stringify(process.env.UNDERLYING_HOSTNAME), }), new MiniCssExtractPlugin({ filename: "./css/[name].css",