This commit is contained in:
Irwan Cahyono 2025-08-07 22:28:48 +07:00
parent 6d2ceb68b0
commit d3d44dacdb
4 changed files with 14 additions and 9 deletions

View File

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

View File

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

View File

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

View File

@ -73,12 +73,5 @@ export default defineNuxtConfig({
}, },
ssr: false, ssr: false,
nitro: {
prerender: {
crawlLinks: false,
routes: []
}
}
}); });