This commit is contained in:
2025-12-02 15:52:23 +01:00
parent b55fdb532b
commit cf7541b5ff
2 changed files with 12 additions and 8 deletions

View File

@@ -1,18 +1,23 @@
# Build stage # -- Build stage --
FROM node:20-alpine AS build FROM node:20-alpine AS build
WORKDIR /app WORKDIR /app
# Copy package files # Alleen package-bestanden eerst (better caching)
COPY package*.json ./ COPY package*.json ./
RUN npm ci RUN npm ci || npm install
# Dan de rest van de code
COPY . . COPY . .
# LET OP: pas dit aan als jouw build-script anders heet
RUN npm run build RUN npm run build
# Runtime stage # -- Serve stage --
FROM nginx:alpine FROM nginx:alpine
WORKDIR /usr/share/nginx/html
COPY --from=build /app/dist/ /usr/share/nginx/html/ # Pas dit aan als jouw outputmap niet 'dist' is (bijv. 'build')
COPY --from=build /app/dist ./
EXPOSE 80 # Optioneel: eigen nginx.conf voor SPA routing
# COPY nginx.conf /etc/nginx/conf.d/default.conf

View File

@@ -2,7 +2,6 @@
"name": "viewer", "name": "viewer",
"version": "0.0.1", "version": "0.0.1",
"description": "", "description": "",
"private": true,
"keywords": [ "keywords": [
"" ""
], ],