21 lines
462 B
Docker
21 lines
462 B
Docker
FROM node:20-alpine
|
|
|
|
WORKDIR /app
|
|
|
|
# copy dependency list
|
|
COPY package.json pnpm-lock.yaml run/entrypoint.sh ./
|
|
COPY prisma ./prisma
|
|
|
|
# Setup pnpm, install Prisma CLI (for generating client) and install dependencies
|
|
RUN apk add dumb-init && \
|
|
npm config set update-notifier false && \
|
|
corepack enable && \
|
|
pnpm i --prod && \
|
|
pnpm audit fix && \
|
|
npx prisma generate
|
|
|
|
# copy built SvelteKit app to /app
|
|
COPY build ./
|
|
|
|
EXPOSE 3000
|
|
CMD ["./entrypoint.sh"]
|