From cf0858ee401a9da192a363ccb133497520a5e30d Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Mon, 29 Apr 2024 22:49:40 +0200 Subject: [PATCH] fix: absoulute redirect in nginx config --- Dockerfile | 9 +++++---- docker/nginx.conf | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9c55c6a47..e3a0d16fb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ FROM node:20-alpine as build +WORKDIR /app + ADD ./build.js /app/build.js ADD ./tsconfig.json /app/tsconfig.json ADD ./svelte.config.js /app/svelte.config.js @@ -9,8 +11,6 @@ ADD ./package-lock.json /app/package-lock.json ADD ./src /app/src ADD ./static /app/static -WORKDIR /app - ARG VITE_CONSOLE_MODE ARG VITE_APPWRITE_ENDPOINT ARG VITE_APPWRITE_GROWTH_ENDPOINT @@ -25,7 +25,8 @@ RUN npm ci RUN npm run build FROM nginx:1.25-alpine -EXPOSE 3000 -COPY docker/nginx.conf /etc/nginx/conf.d/default.conf +EXPOSE 3000 + +COPY docker/nginx.conf /etc/nginx/conf.d/default.conf COPY --from=build /app/build /usr/share/nginx/html/console diff --git a/docker/nginx.conf b/docker/nginx.conf index 943a9b0a5..ed8ea5f53 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -10,6 +10,7 @@ server { } location / { + absolute_redirect off; return 301 /console; } }