docker mvp

This commit is contained in:
2025-08-16 01:53:05 -04:00
parent 3108053017
commit 7083c816ec
4 changed files with 29 additions and 32 deletions

View File

@@ -1,35 +1,14 @@
# =====================
# Build Stage
# =====================
FROM oven/bun:1.2.10-alpine AS builder
# syntax=docker.io/docker/dockerfile:1
WORKDIR /app
FROM oven/bun:1.2.10 AS base
# Install dependencies
COPY package.json bun.lock ./
COPY package.json bun.lock* ./
RUN bun install --frozen-lockfile
# Copy rest of app
COPY . .
# Build Next.js app
RUN bun run build
# =====================
# Runtime Stage
# =====================
FROM oven/bun:1.2.10-alpine
WORKDIR /app
# Copy only necessary files from builder
COPY --from=builder /app/package.json /app/package.json
COPY --from=builder /app/.next /app/.next
COPY --from=builder /app/public /app/public
COPY --from=builder /app/node_modules /app/node_modules
# Expose port
EXPOSE 3000
# Run in production
CMD ["bun", "run", "start"]
CMD ["bun", "start"]