Replace full nginx config to fix MIME type issue

This commit is contained in:
Brendon Heinst 2026-02-24 14:19:12 +01:00
parent 867309cab8
commit f9be2a14c4
2 changed files with 17 additions and 7 deletions

View file

@ -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

View file

@ -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;
}
}
}