Files
wishlist/Dockerfile
Rasmus Q bc680fb60b refactor: add proper types for all database insert operations
- Add missing Select and Insert types for Auth.js tables (Account, Session, VerificationToken)
- Update all insert operations to use typed New* variables:
  - NewUser for user signup
  - NewItem for adding wishlist items
  - NewSavedWishlist for saving wishlists
- Improves type safety and catches insert errors at compile time
2026-03-15 21:38:54 +00:00

42 lines
885 B
Docker

# Use Bun's official image
FROM oven/bun:1 AS base
WORKDIR /app
# Install dependencies
FROM base AS deps
COPY package.json bun.lock* ./
COPY patches ./patches
RUN bun install --frozen-lockfile
RUN bunx patch-package
# Build the application
FROM base AS builder
COPY --from=deps /app/node_modules ./node_modules
COPY . .
# Build the SvelteKit app
RUN bun run build
# Production image
FROM base AS runner
WORKDIR /app
ENV NODE_ENV=production
ENV PORT=3000
# Copy built application
COPY --from=builder /app/build ./build
COPY --from=builder /app/package.json ./
COPY --from=deps /app/node_modules ./node_modules
# Copy Drizzle files for migrations
COPY --from=builder /app/drizzle ./drizzle
COPY --from=builder /app/drizzle.config.ts ./
COPY --from=builder /app/src/lib/db ./src/lib/db
# Expose the port
EXPOSE 3000
# Start the application
CMD ["bun", "run", "./build/index.js"]