Replace full nginx config to fix MIME type issue
This commit is contained in:
parent
867309cab8
commit
f9be2a14c4
2 changed files with 17 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
22
nginx.conf
22
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue