From 4fcb757cf5fcfc737805b4064def154ced877fee Mon Sep 17 00:00:00 2001 From: Min Idzelis Date: Fri, 14 Jun 2024 02:42:45 +0000 Subject: [PATCH] feat: split ips; internal local ip when on LAN, external ip otherwise --- web/Dockerfile | 1 + web/src/app.html | 61 +++++++++++++++++++++++++++++++++++ web/src/lib/utils/server.ts | 38 ++++++++++++++++++++++ web/src/routes/+layout.svelte | 44 ++++++++++++++----------- web/src/routes/+layout.ts | 14 +++++--- 5 files changed, 134 insertions(+), 24 deletions(-) create mode 100644 web/src/lib/utils/server.ts diff --git a/web/Dockerfile b/web/Dockerfile index f28a5f883d..c35aee5fd2 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -7,6 +7,7 @@ COPY --chown=node:node package*.json ./ RUN npm ci COPY --chown=node:node . . ENV CHOKIDAR_USEPOLLING=true +ENV PUBLIC_SERVER_URLS= EXPOSE 24678 EXPOSE 3000 ENTRYPOINT ["/sbin/tini", "--", "/bin/sh"] diff --git a/web/src/app.html b/web/src/app.html index d1db02f493..6556344201 100644 --- a/web/src/app.html +++ b/web/src/app.html @@ -14,6 +14,55 @@ %sveltekit.head% +