containerized app

This commit is contained in:
2024-11-16 15:31:49 -06:00
parent 395bd3394e
commit 369f7e8946
5 changed files with 255 additions and 3 deletions

13
Dockerfile Normal file
View File

@@ -0,0 +1,13 @@
FROM node:22.11.0-alpine AS builder
WORKDIR /app
COPY . .
RUN npm install && npm run build
FROM node:22.11.0-alpine AS runner
LABEL maintainer="Nicola Clark <nicola@slottedspoon.dev>"
EXPOSE 3000
WORKDIR /app
COPY package.json package-lock.json ./
COPY --from=builder /app/build ./build
RUN npm ci --omit dev
CMD ["node", "build"]