chore: add Dockerfile for deployment

This commit is contained in:
Sjoerd de Vries
2026-09-05 15:28:31 +02:00
parent 5b6d672506
commit 195dff6fe3
2 changed files with 20 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
node_modules
data
.env
.git
docs
test
+14
View File
@@ -0,0 +1,14 @@
FROM node:22-slim AS build
RUN apt-get update && apt-get install -y --no-install-recommends python3 build-essential \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci --omit=dev
COPY . .
FROM node:22-slim
WORKDIR /app
COPY --from=build /app .
ENV NODE_ENV=production
EXPOSE 3000
CMD ["node", "server.js"]