spa
This commit is contained in:
parent
01a1bae275
commit
8a79a37d29
@ -8,7 +8,7 @@ RUN npm install --legacy-peer-deps
|
|||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN npm run build
|
RUN npm run generate
|
||||||
|
|
||||||
# Dockerfile untuk server Nuxt 3
|
# Dockerfile untuk server Nuxt 3
|
||||||
FROM nginx:1.29-alpine
|
FROM nginx:1.29-alpine
|
||||||
|
|||||||
17
nginx.conf
17
nginx.conf
@ -2,20 +2,25 @@ server {
|
|||||||
listen 80;
|
listen 80;
|
||||||
server_name localhost;
|
server_name localhost;
|
||||||
|
|
||||||
root /var/www/html;
|
|
||||||
index index.html;
|
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
|
root /var/www/html;
|
||||||
|
index index.html;
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /_nuxt/ {
|
location /_nuxt/ {
|
||||||
|
alias /var/www/html/_nuxt/;
|
||||||
expires 1y;
|
expires 1y;
|
||||||
add_header Cache-Control "public";
|
add_header Cache-Control "public";
|
||||||
}
|
}
|
||||||
|
|
||||||
location = /index.html {
|
location ~ /\. {
|
||||||
expires -1;
|
deny all;
|
||||||
add_header Cache-Control "no-store";
|
}
|
||||||
|
|
||||||
|
error_page 404 /index.html;
|
||||||
|
error_page 500 502 503 504 /50x.html;
|
||||||
|
location = /50x.html {
|
||||||
|
root /usr/share/nginx/html;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -77,13 +77,9 @@ export default defineNuxtConfig({
|
|||||||
},
|
},
|
||||||
|
|
||||||
ssr: false,
|
ssr: false,
|
||||||
// nitro: {
|
target: 'static',
|
||||||
// preset: 'static', // Generate file static
|
generate: {
|
||||||
// prerender: {
|
dir: '.output/public',
|
||||||
// failOnError: false, // Skip error saat generate
|
}
|
||||||
// ignore: ['/dynamic-route'], // Ignore route tertentu
|
|
||||||
// crawlLinks: false // Nonaktifkan crawler
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
|
|
||||||
});
|
});
|
||||||
1
package-lock.json
generated
1
package-lock.json
generated
@ -3515,7 +3515,6 @@
|
|||||||
},
|
},
|
||||||
"node_modules/@parcel/watcher-wasm/node_modules/napi-wasm": {
|
"node_modules/@parcel/watcher-wasm/node_modules/napi-wasm": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"dev": true,
|
|
||||||
"inBundle": true,
|
"inBundle": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user