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 ----
|
# ---- deps ----
|
||||||
FROM base AS deps
|
FROM base AS deps
|
||||||
|
|
||||||
COPY package.json bun.lock ./
|
COPY package.json bun.lockb ./
|
||||||
RUN bun install --frozen-lockfile
|
RUN bun install --frozen-lockfile
|
||||||
|
|
||||||
# ---- builder ----
|
# ---- builder ----
|
||||||
@@ -22,9 +22,7 @@ RUN bunx prisma generate
|
|||||||
|
|
||||||
COPY src ./src
|
COPY src ./src
|
||||||
COPY types ./types
|
COPY types ./types
|
||||||
COPY tsconfig.json bunfig.toml ./
|
COPY tsconfig.json ./
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# BUN_PUBLIC_* vars are baked into the browser bundle at build time
|
# BUN_PUBLIC_* vars are baked into the browser bundle at build time
|
||||||
ARG BUN_PUBLIC_BASE_URL
|
ARG BUN_PUBLIC_BASE_URL
|
||||||
@@ -34,15 +32,15 @@ RUN bun run build
|
|||||||
# ---- runner ----
|
# ---- runner ----
|
||||||
FROM base AS runner
|
FROM base AS runner
|
||||||
|
|
||||||
COPY package.json bun.lock ./
|
COPY package.json bun.lockb ./
|
||||||
RUN bun install --production
|
RUN bun install --production
|
||||||
|
|
||||||
COPY --from=builder /app/generated ./generated
|
COPY --from=builder /app/generated ./generated
|
||||||
COPY --from=builder /app/dist ./dist
|
COPY --from=builder /app/.next ./.next
|
||||||
COPY src ./src
|
COPY src ./src
|
||||||
COPY prisma ./prisma
|
COPY prisma ./prisma
|
||||||
COPY types ./types
|
COPY types ./types
|
||||||
COPY tsconfig.json bunfig.toml ./
|
COPY tsconfig.json ./
|
||||||
|
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|||||||
Reference in New Issue
Block a user