From 855eaff32356085d8e27eca66d1ce5cf1d428762 Mon Sep 17 00:00:00 2001 From: Dave Smith-Hayes Date: Sat, 26 Oct 2024 21:35:30 -0400 Subject: [PATCH] Update the environment variabels. --- Dockerfile | 2 ++ chat-app/static/js/index.js | 6 +----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 39dd7c7..b18b4c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,8 @@ COPY --from=install /temp/build/node_modules node_modules COPY ./chat-app . ENV NODE_ENV=production +ENV APP_URL=chat.freedoom.party +ENV APP_PORT=3000 RUN bun run build USER bun diff --git a/chat-app/static/js/index.js b/chat-app/static/js/index.js index ce2af26..cd3639b 100644 --- a/chat-app/static/js/index.js +++ b/chat-app/static/js/index.js @@ -1722,11 +1722,7 @@ var import_mithril = __toESM(require_mithril(), 1); // frontend/websocket.js function createWebSocket() { let appUrl = "localhost:3000"; - if (appUrl.includes("localhost")) { - appUrl = `//${appUrl}/chat-service`; - } else { - appUrl = `//${appUrl}/chat-service`; - } + appUrl = `//${appUrl}/chat-service`; return new WebSocket(appUrl); }