From 13cb46658faf00cd98599f5ab6bfd6023d205d89 Mon Sep 17 00:00:00 2001 From: Dennis Postma Date: Fri, 18 Oct 2024 19:45:25 +0200 Subject: [PATCH] nginx conf. test --- Dockerfile | 1 + nginx.conf | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 nginx.conf diff --git a/Dockerfile b/Dockerfile index 17bf6e8..add8bcf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,5 +27,6 @@ RUN npm run build-ntc # Production stage FROM nginx:1.26.1-alpine COPY --from=builder /usr/src/app/dist /usr/share/nginx/html +COPY nginx.conf /etc/nginx/conf.d/default.conf EXPOSE 80 CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..f062ea5 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,16 @@ +server { + listen 80; + server_name localhost; + root /usr/share/nginx/html; + index index.html; + + # Redirect example + location /discord { + return 301 https://discord.gg/JTev3nzeDa; + } + + # Serve static files + location / { + try_files $uri $uri/ /index.html; + } +} \ No newline at end of file