From 3ca2da3e057158f1a61b0bef1e57e86303266ede Mon Sep 17 00:00:00 2001 From: Yash Chudasama Date: Wed, 10 Apr 2024 11:21:04 +0530 Subject: [PATCH] Updated nginx default.conf file --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 3ef2505..724eafa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,5 +9,6 @@ RUN npm run build # Stage 2: Setup the Nginx Server to serve the NextJS Application FROM nginx:stable-alpine3.17 as production COPY --from=build /app/dist /usr/share/nginx/html +RUN echo 'server { listen 80; server_name _; root /usr/share/nginx/html; location / { try_files $uri /index.html; } }' > /etc/nginx/conf.d/default.conf EXPOSE 80 CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file