Add Docker support with Dockerfile and .dockerignore, update package dependencies, and switch to adapter-node for Svelte
This commit is contained in:
26
Dockerfile
Normal file
26
Dockerfile
Normal 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"]
|
||||
Reference in New Issue
Block a user