cobalagi
This commit is contained in:
parent
6d2ceb68b0
commit
d3d44dacdb
@ -16,9 +16,11 @@ RUN test -f .output/public/index.html
|
|||||||
# Gunakan NGINX untuk menyajikan SPA
|
# Gunakan NGINX untuk menyajikan SPA
|
||||||
FROM nginx:1.29.0-alpine-slim
|
FROM nginx:1.29.0-alpine-slim
|
||||||
|
|
||||||
|
RUN rm -rf /usr/share/nginx/html/*
|
||||||
|
|
||||||
RUN rm /etc/nginx/conf.d/default.conf
|
RUN rm /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
COPY --from=builder /app/.output/public /usr/share/nginx/html
|
COPY --from=builder /app/dsit /usr/share/nginx/html
|
||||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
services:
|
services:
|
||||||
nuxt-app:
|
nuxt-app:
|
||||||
build: .
|
build: .
|
||||||
container_name: nuxt-container
|
container_name: freekake-nuxt-container
|
||||||
ports:
|
ports:
|
||||||
- "3000:80"
|
- "3000:80"
|
||||||
env_file:
|
env_file:
|
||||||
|
|||||||
10
nginx.conf
10
nginx.conf
@ -9,5 +9,15 @@ server {
|
|||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
||||||
|
expires 7d;
|
||||||
|
access_log off;
|
||||||
|
add_header Cache-Control "public";
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ /\. {
|
||||||
|
deny all;
|
||||||
|
}
|
||||||
|
|
||||||
error_page 404 /index.html;
|
error_page 404 /index.html;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -73,12 +73,5 @@ export default defineNuxtConfig({
|
|||||||
},
|
},
|
||||||
|
|
||||||
ssr: false,
|
ssr: false,
|
||||||
nitro: {
|
|
||||||
prerender: {
|
|
||||||
crawlLinks: false,
|
|
||||||
routes: []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
Loading…
Reference in New Issue
Block a user