From ebdafee81fa5c58549407ebdbffff97106129f32 Mon Sep 17 00:00:00 2001 From: henridb <henridb@stud.ntnu.no> Date: Thu, 2 May 2024 18:59:11 +0200 Subject: [PATCH] fix: add nginx conf --- Dockerfile | 2 +- web/nginx.conf | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 web/nginx.conf diff --git a/Dockerfile b/Dockerfile index 6dfb519..5a4daa1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,6 @@ RUN npm run build # Step 2: Setup the server with Nginx FROM nginx:stable-alpine as production-stage COPY --from=build-stage /app/dist /usr/share/nginx/html -COPY nginx.conf /etc/nginx/nginx.conf +COPY web/nginx.conf /etc/nginx/nginx.conf EXPOSE 80 CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/web/nginx.conf b/web/nginx.conf new file mode 100644 index 0000000..60d2005 --- /dev/null +++ b/web/nginx.conf @@ -0,0 +1,9 @@ +server { + listen 80; + server_name localhost; + + location / { + root /usr/share/nginx/html; + try_files $uri $uri/ /index.html; + } +} \ No newline at end of file -- GitLab