From aa094d665c693e3b2a35e6667c64ec1344a95478 Mon Sep 17 00:00:00 2001 From: muhammadeko Date: Sat, 30 Apr 2022 15:33:30 +0700 Subject: [PATCH] add nginx-conf --- Dockerfile | 1 + nginx.conf | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 nginx.conf diff --git a/Dockerfile b/Dockerfile index 29ba4c5..3f6c54e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,4 +9,5 @@ FROM nginx:alpine WORKDIR /usr/share/nginx/html RUN rm -rf * COPY --from=builder /app/build . +COPY nginx.conf /etc/nginx/conf.d/default.conf ENTRYPOINT ["nginx","-g","daemon off;"] \ No newline at end of file diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..a4b09de --- /dev/null +++ b/nginx.conf @@ -0,0 +1,15 @@ +server { + listen 80; + server_name localhost; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + try_files $uri /index.html; + } + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } +} \ No newline at end of file