diff --git a/Dockerfile b/Dockerfile index 038646d..4a6d022 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,14 +40,12 @@ CMD ["bun", "run", "dev"] # ============================================ FROM base AS builder -# Copy dependencies from deps stage +# Copy source code first, then deps on top (so node_modules aren't overwritten) +COPY . . COPY --from=deps /app/node_modules ./node_modules -# Copy source code -COPY . . - -# Build admin panel -RUN cd panel && ../node_modules/.bin/vite build +# Install panel deps and build +RUN cd panel && bun install --frozen-lockfile && bun run build # ============================================ # Production stage - minimal runtime image