ci: Fix MIMETYPEs
This commit is contained in:
parent
9dfa16f5f0
commit
7b317b28d1
2 changed files with 18 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue