style: move button
This commit is contained in:
+7
-3
@@ -1,10 +1,13 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
# Stage 1: Install dependencies
|
||||
FROM oven/bun:alpine AS deps
|
||||
WORKDIR /app
|
||||
# Copy only package files to leverage Docker layer caching
|
||||
COPY package.json bun.lock ./
|
||||
# Install dependencies
|
||||
RUN bun install --frozen-lockfile
|
||||
RUN --mount=type=cache,target=/root/.bun/install/cache \
|
||||
bun install --frozen-lockfile
|
||||
|
||||
# Stage 2: Build the application
|
||||
FROM oven/bun:alpine AS builder
|
||||
@@ -12,7 +15,8 @@ WORKDIR /app
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
# Build Next.js
|
||||
RUN bun run build
|
||||
RUN --mount=type=cache,target=/app/.next/cache \
|
||||
bun run build
|
||||
|
||||
# Stage 3: Production runner
|
||||
FROM oven/bun:alpine AS runner
|
||||
@@ -27,4 +31,4 @@ COPY --from=builder /app/node_modules ./node_modules
|
||||
COPY --from=builder /app/package.json ./package.json
|
||||
|
||||
EXPOSE 3000
|
||||
CMD ["bun", "start"]
|
||||
CMD ["bun", "start"]
|
||||
|
||||
Reference in New Issue
Block a user