Skip to content

Commit 957dcf0

Browse files
fix: use vite build directly instead of npm run build
- npm run build includes esbuild server compilation - Docker only needs frontend vite build - Prevents server compilation conflicts in builder stage
1 parent 75aa83f commit 957dcf0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ COPY shared/ ./shared/
1212
COPY vite.config.ts ./
1313
COPY tsconfig*.json ./
1414

15-
# Build frontend (outputs to /app/dist/public)
16-
RUN npm run build
15+
# Build ONLY frontend (not server)
16+
RUN npx vite build --config vite.config.ts
1717

1818
# Production stage
1919
FROM node:20-alpine
@@ -28,7 +28,7 @@ RUN npm install --production
2828
COPY shared/ ./shared/
2929
COPY server/ ./
3030

31-
# Copy frontend build from builder stage (correct path: /app/dist/public)
31+
# Copy frontend build from builder stage
3232
COPY --from=frontend-builder /app/dist/public/ ./dist/public/
3333

3434
# Environment

0 commit comments

Comments
 (0)