add seeding
This commit is contained in:
parent
2346fe4879
commit
970865c7a4
3 changed files with 21 additions and 7 deletions
24
Dockerfile
24
Dockerfile
|
@ -1,22 +1,32 @@
|
|||
FROM oven/bun:alpine
|
||||
FROM docker.io/oven/bun:alpine AS base
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
WORKDIR /app
|
||||
RUN chown -R bun:bun /app
|
||||
USER bun
|
||||
|
||||
COPY bun.lock ./
|
||||
COPY package.json ./
|
||||
COPY tsconfig.build.json ./
|
||||
COPY tsconfig.json ./
|
||||
COPY package.json ./
|
||||
COPY bun.lock ./
|
||||
|
||||
RUN bun install --production --frozen-lockfile
|
||||
RUN bun install --ignore-scripts --production --frozen-lockfile
|
||||
|
||||
FROM base AS builder
|
||||
|
||||
COPY prisma ./prisma/
|
||||
RUN bunx prisma generate
|
||||
|
||||
COPY . .
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
RUN bun run build
|
||||
|
||||
FROM base AS runner
|
||||
|
||||
COPY --from=builder /app/dist ./dist
|
||||
COPY --from=builder /app/prisma ./prisma
|
||||
|
||||
EXPOSE 4000
|
||||
|
||||
CMD bunx prisma migrate deploy && bunx prisma db seed && bun run start:prod
|
||||
CMD bun prisma migrate deploy && bun run start:prod
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue