Skip to content

Commit 75aa83f

Browse files
fix: correct frontend build output path in Dockerfile
- Vite config outputs to dist/public at root, not client/dist/public - Added shared/ to builder stage (required for build) - Updated COPY path to /app/dist/public from builder
1 parent d49f4d8 commit 75aa83f

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ RUN npm install
88

99
# Copy necessary files for build
1010
COPY client/ ./client/
11+
COPY shared/ ./shared/
1112
COPY vite.config.ts ./
1213
COPY tsconfig*.json ./
1314

14-
# Build frontend
15+
# Build frontend (outputs to /app/dist/public)
1516
RUN npm run build
1617

1718
# Production stage
@@ -27,8 +28,8 @@ RUN npm install --production
2728
COPY shared/ ./shared/
2829
COPY server/ ./
2930

30-
# Copy frontend build from builder stage
31-
COPY --from=frontend-builder /app/client/dist/public/ ./dist/public/
31+
# Copy frontend build from builder stage (correct path: /app/dist/public)
32+
COPY --from=frontend-builder /app/dist/public/ ./dist/public/
3233

3334
# Environment
3435
ENV NODE_ENV=production

0 commit comments

Comments
 (0)