From 62edbd20c591de962e06a424b52924082b932e7b Mon Sep 17 00:00:00 2001 From: Witalij Poljatchek Date: Thu, 11 Jan 2024 00:15:38 +0100 Subject: [PATCH] nginx conf --- Dockerfile | 10 +++------- _nginx/nginx.conf | 11 +++++++++++ 2 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 _nginx/nginx.conf diff --git a/Dockerfile b/Dockerfile index 5eeac37..8026386 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,11 +5,7 @@ RUN node -v WORKDIR /app COPY . . - FROM nginx -RUN ls -RUN ls -COPY --from=build . /usr/share/nginx/html/ -RUN ls /usr/share/nginx/html/ -#RUN rm /etc/nginx/conf.d/default.conf -#COPY _nginx/nginx.conf /etc/nginx/conf.d +COPY --from=build /app /usr/share/nginx/html/ +RUN rm /etc/nginx/conf.d/default.conf +COPY _nginx/nginx.conf /etc/nginx/conf.d diff --git a/_nginx/nginx.conf b/_nginx/nginx.conf new file mode 100644 index 0000000..4509e7a --- /dev/null +++ b/_nginx/nginx.conf @@ -0,0 +1,11 @@ +server { + listen 80; + location / { + root /usr/share/nginx/html; + index index.html index.htm; + try_files $uri $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