23 lines
469 B
Docker
23 lines
469 B
Docker
# Dockerfile untuk SPA Nuxt 3
|
|
FROM node:24-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package*.json ./
|
|
RUN npm install --legacy-peer-deps
|
|
|
|
COPY . .
|
|
|
|
RUN npm run build
|
|
|
|
# Gunakan NGINX untuk menyajikan SPA
|
|
FROM nginx:1.29.0-alpine-slim
|
|
|
|
# Salin hasil build ke folder root nginx
|
|
COPY --from=builder /app/.output/public /usr/share/nginx/html
|
|
|
|
# Salin konfigurasi khusus NGINX untuk SPA (opsional tapi direkomendasikan)
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
EXPOSE 80
|