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); }