migrate: switch from bun to pnpm and add zod dependency
This commit is contained in:
17
Dockerfile
17
Dockerfile
@@ -1,13 +1,16 @@
|
||||
# Use Bun's official image
|
||||
FROM oven/bun:1 AS base
|
||||
# Use Node.js official image
|
||||
FROM node:20-alpine AS base
|
||||
WORKDIR /app
|
||||
|
||||
# Install pnpm
|
||||
RUN npm install -g pnpm
|
||||
|
||||
# Install dependencies
|
||||
FROM base AS deps
|
||||
COPY package.json bun.lock* ./
|
||||
COPY package.json pnpm-lock.yaml* ./
|
||||
COPY patches ./patches
|
||||
RUN bun install --frozen-lockfile
|
||||
RUN bunx patch-package
|
||||
RUN pnpm install --frozen-lockfile
|
||||
RUN pnpm patch-package
|
||||
|
||||
# Build the application
|
||||
FROM base AS builder
|
||||
@@ -15,7 +18,7 @@ COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
|
||||
# Build the SvelteKit app
|
||||
RUN bun run build
|
||||
RUN pnpm run build
|
||||
|
||||
# Production image
|
||||
FROM base AS runner
|
||||
@@ -38,4 +41,4 @@ COPY --from=builder /app/src/lib/db ./src/lib/db
|
||||
EXPOSE 3000
|
||||
|
||||
# Start the application
|
||||
CMD ["bun", "run", "./build/index.js"]
|
||||
CMD ["node", "./build/index.js"]
|
||||
|
||||
Reference in New Issue
Block a user