Update the environment variabels.

This commit is contained in:
Dave Smith-Hayes 2024-10-26 21:35:30 -04:00
parent 33323b5ea1
commit 855eaff323
2 changed files with 3 additions and 5 deletions

View File

@ -11,6 +11,8 @@ COPY --from=install /temp/build/node_modules node_modules
COPY ./chat-app . COPY ./chat-app .
ENV NODE_ENV=production ENV NODE_ENV=production
ENV APP_URL=chat.freedoom.party
ENV APP_PORT=3000
RUN bun run build RUN bun run build
USER bun USER bun

View File

@ -1722,11 +1722,7 @@ var import_mithril = __toESM(require_mithril(), 1);
// frontend/websocket.js // frontend/websocket.js
function createWebSocket() { function createWebSocket() {
let appUrl = "localhost:3000"; let appUrl = "localhost:3000";
if (appUrl.includes("localhost")) { appUrl = `//${appUrl}/chat-service`;
appUrl = `//${appUrl}/chat-service`;
} else {
appUrl = `//${appUrl}/chat-service`;
}
return new WebSocket(appUrl); return new WebSocket(appUrl);
} }