Files
vinci/Dockerfile
2026-04-01 23:34:22 +02:00

36 lines
848 B
Docker

FROM oven/bun:alpine AS base
WORKDIR /app
# Install dependencies
FROM base AS deps
COPY package.json bun.lock ./
RUN bun install --frozen-lockfile
# Build the application
FROM base AS build
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN bun prisma generate
RUN bun run build
# Production image
FROM base AS runner
WORKDIR /app
ENV NODE_ENV=production
# Install system dependencies
RUN apk add --no-cache ffmpeg fontconfig ttf-opensans msttcorefonts-installer && \
update-ms-fonts && \
fc-cache -f
COPY --from=build /app/node_modules ./node_modules
COPY --from=build /app/dist ./dist
COPY --from=build /app/assets ./assets
COPY --from=build /app/images ./images
COPY --from=build /app/.sern ./.sern
COPY --from=build /app/package.json ./package.json
COPY --from=build /app/prisma ./prisma
CMD ["bun", "dist/index.js"]