ci: Fix MIMETYPEs

This commit is contained in:
Tibo De Peuter 2025-03-13 00:15:47 +01:00
parent 9dfa16f5f0
commit 7b317b28d1
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
2 changed files with 18 additions and 1 deletions

View file

@ -1,10 +1,19 @@
worker_processes auto;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
types {
application/javascript js mjs;
text/css css;
}
server {
listen 80;
@ -12,5 +21,12 @@ http {
root /usr/share/nginx/html;
try_files $uri $uri/ /index.html;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
root /usr/share/nginx/html;
expires 1y;
add_header Cache-Control "public";
try_files $uri =404;
}
}
}

View file

@ -22,12 +22,13 @@ WORKDIR /app/frontend
COPY frontend ./
RUN npm run build
RUN npx vite build
FROM nginx:stable AS production-stage
COPY config/nginx/nginx.conf /etc/nginx/nginx.conf
COPY --from=build-stage /app/assets /usr/share/nginx/html/assets
COPY --from=build-stage /app/frontend/dist /usr/share/nginx/html
EXPOSE 80