24 lines
468 B
Docker
24 lines
468 B
Docker
# syntax=docker/dockerfile:1
|
|
|
|
# Stage 1: Build frontend
|
|
FROM node:20-alpine AS frontend-builder
|
|
WORKDIR /app/frontend
|
|
COPY crmDashboard/package*.json ./
|
|
RUN npm install
|
|
COPY crmDashboard/ ./
|
|
RUN npm run build
|
|
|
|
# Stage 2: Bun backend
|
|
FROM oven/bun:1-alpine
|
|
WORKDIR /app
|
|
|
|
COPY backend/package.json backend/bun.lockb* ./
|
|
RUN bun install --production
|
|
|
|
COPY backend/ ./
|
|
COPY --from=frontend-builder /app/frontend/dist ./public
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD ["bun", "run", "server.js"]
|