From 61e6f2c8b6b72ffec2a6ac8a800bf46aaed73793 Mon Sep 17 00:00:00 2001 From: dragongoose <19649813+dragongoose@users.noreply.github.com> Date: Sun, 26 Mar 2023 19:11:06 -0400 Subject: [PATCH] Use nginx config --- docker/Dockerfile | 1 + nginx.conf | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 nginx.conf diff --git a/docker/Dockerfile b/docker/Dockerfile index 8139e04..9a6b8b3 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -13,6 +13,7 @@ RUN npm i && npm run build # nginx state for serving content FROM nginx:alpine +COPY ./nginx.conf /etc/nginx/nginx.conf # Set working directory to nginx asset directory WORKDIR /usr/share/nginx/html # Remove default nginx static assets diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..8365ad1 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,14 @@ +events {} +http { + include mime.types; + + server { + listen 80; + + location / { + root /usr/share/nginx/html; + index index.html; + try_files $uri $uri/ /index.html; + } + } +} \ No newline at end of file