Private
Public Access
1
0

feat: add container file

- update README.md for containerization
This commit is contained in:
2026-02-12 19:52:57 +01:00
parent cbbc21f40c
commit 7249cbde25
2 changed files with 61 additions and 0 deletions

22
Containerfile Normal file
View File

@@ -0,0 +1,22 @@
# Stage 1: Build
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
RUN npm prune --production
# Stage 2: Run
FROM node:20-alpine
WORKDIR /app
COPY --from=builder /app/build ./build
COPY --from=builder /app/node_modules ./node_modules
COPY package.json .
# Default SvelteKit production port
ENV PORT=3000
EXPOSE 3000
# Start the app
CMD ["node", "build"]