Dockerify

This commit is contained in:
2025-12-01 12:08:52 +01:00
parent 7d0446433f
commit 8ec4279af5
2 changed files with 25 additions and 1 deletions

1
.gitignore vendored
View File

@@ -4,3 +4,4 @@
node_modules
dist
.cache
.idea/

View File

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