diff --git a/Dockerfile b/Dockerfile index c25b2d9..750a8e0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,5 +6,5 @@ COPY . . RUN npm run build FROM nginx:alpine -COPY nginx.conf /etc/nginx/conf.d/default.conf +COPY nginx.conf /etc/nginx/nginx.conf COPY --from=builder /app/dist /usr/share/nginx/html diff --git a/nginx.conf b/nginx.conf index 1777b9f..85d6fa4 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,11 +1,21 @@ -server { - listen 80; - root /usr/share/nginx/html; - index index.html; +worker_processes auto; +events { + worker_connections 1024; +} + +http { include /etc/nginx/mime.types; + default_type application/octet-stream; + sendfile on; - location / { - try_files $uri $uri/ /index.html; + server { + listen 80; + root /usr/share/nginx/html; + index index.html; + + location / { + try_files $uri $uri/ /index.html; + } } }