fix: perbaiki Dockerfile - lockfile, bunfig.toml, dan path build output
- Ganti bun.lock → bun.lockb (nama file yang benar) - Hapus bunfig.toml dari COPY (file tidak ada) - Ganti /app/dist → /app/.next (output Next.js build) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -11,7 +11,7 @@ WORKDIR /app
|
||||
# ---- deps ----
|
||||
FROM base AS deps
|
||||
|
||||
COPY package.json bun.lock ./
|
||||
COPY package.json bun.lockb ./
|
||||
RUN bun install --frozen-lockfile
|
||||
|
||||
# ---- builder ----
|
||||
@@ -22,9 +22,7 @@ RUN bunx prisma generate
|
||||
|
||||
COPY src ./src
|
||||
COPY types ./types
|
||||
COPY tsconfig.json bunfig.toml ./
|
||||
|
||||
|
||||
COPY tsconfig.json ./
|
||||
|
||||
# BUN_PUBLIC_* vars are baked into the browser bundle at build time
|
||||
ARG BUN_PUBLIC_BASE_URL
|
||||
@@ -34,15 +32,15 @@ RUN bun run build
|
||||
# ---- runner ----
|
||||
FROM base AS runner
|
||||
|
||||
COPY package.json bun.lock ./
|
||||
COPY package.json bun.lockb ./
|
||||
RUN bun install --production
|
||||
|
||||
COPY --from=builder /app/generated ./generated
|
||||
COPY --from=builder /app/dist ./dist
|
||||
COPY --from=builder /app/.next ./.next
|
||||
COPY src ./src
|
||||
COPY prisma ./prisma
|
||||
COPY types ./types
|
||||
COPY tsconfig.json bunfig.toml ./
|
||||
COPY tsconfig.json ./
|
||||
|
||||
ENV NODE_ENV=production
|
||||
EXPOSE 3000
|
||||
|
||||
Reference in New Issue
Block a user