From e4f6863e212d6ab34be25846609beb7fd9927a19 Mon Sep 17 00:00:00 2001 From: kieran Date: Tue, 26 Nov 2024 19:17:48 +0000 Subject: [PATCH] feat: add nginx conf --- Dockerfile | 3 ++- nginx.conf | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 nginx.conf diff --git a/Dockerfile b/Dockerfile index 9847da2..05de51c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,4 +5,5 @@ RUN yarn && yarn build FROM nginx as runner WORKDIR /usr/share/nginx/html -COPY --from=builder /src/dist . \ No newline at end of file +COPY --from=builder /src/dist . +COPY nginx.conf /etc/nginx/conf.d/default.conf \ No newline at end of file diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..77fe1d7 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,10 @@ +server { + listen 80 default_server; + server_name _; + root /usr/share/nginx/html; + index index.html; + + location / { + try_files $uri $uri/ /index.html =404; + } +} \ No newline at end of file