Add Docker support with Dockerfile and .dockerignore, update package dependencies, and switch to adapter-node for Svelte

This commit is contained in:
Norbert Maciaszek
2025-11-25 10:30:54 +01:00
parent f31eb3dc0d
commit 678605b7bc
8 changed files with 307 additions and 29 deletions

26
Dockerfile Normal file
View File

@@ -0,0 +1,26 @@
FROM node:22-alpine
WORKDIR /app
COPY package.json .
COPY package-lock.json .
RUN npm install
ARG DATABASE_URL
ENV DATABASE_URL=$DATABASE_URL
COPY prisma.config.ts .
COPY prisma ./prisma
RUN npx prisma migrate deploy
RUN npx prisma generate
COPY . .
RUN npm run build
EXPOSE 3000
ARG ORIGIN
ENV ORIGIN=$ORIGIN
CMD ["node", "build"]