From e3a7b766ba94bb5616cd4a40d48c8dbef851d60d Mon Sep 17 00:00:00 2001 From: smolkik-code Date: Thu, 25 Jun 2026 14:54:22 +0700 Subject: [PATCH] fix: replace nginx.conf entirely, bypass entrypoint conflict --- frontend/Dockerfile | 2 +- frontend/nginx.conf | 28 +++++++++++++++++++++------- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 767d408..60d055f 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -8,6 +8,6 @@ RUN npm run build FROM nginx:alpine COPY --from=build /app/dist /usr/share/nginx/html RUN rm -f /etc/nginx/conf.d/default.conf -COPY nginx.conf /etc/nginx/conf.d/app.conf +COPY nginx.conf /etc/nginx/nginx.conf EXPOSE 80 CMD ["nginx", "-g", "daemon off;"] diff --git a/frontend/nginx.conf b/frontend/nginx.conf index 3c25a98..b0c2405 100644 --- a/frontend/nginx.conf +++ b/frontend/nginx.conf @@ -1,10 +1,24 @@ -server { - listen 80; - server_name _; - root /usr/share/nginx/html; - index index.html; +worker_processes auto; - location / { - try_files $uri $uri/ /index.html; +events { + worker_connections 1024; +} + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + sendfile on; + keepalive_timeout 65; + + server { + listen 80; + server_name _; + root /usr/share/nginx/html; + index index.html; + + location / { + try_files $uri $uri/ /index.html; + } } }