reorg: separate frontend and backend

This commit is contained in:
2025-02-23 11:45:40 -08:00
parent b2b70f3eb1
commit b3cf5fb3c8
12 changed files with 7752 additions and 2154 deletions

View File

@@ -4,18 +4,18 @@ FROM --platform=$TARGETPLATFORM node:20-slim AS builder
WORKDIR /app
# Copy package files
COPY package*.json ./
COPY backend/package*.json ./backend/
COPY frontend/package*.json ./frontend/
# Install dependencies
RUN npm ci
RUN cd backend && npm ci
RUN cd frontend && npm ci
# Copy source files
COPY . .
# Build frontend and backend
RUN npm run build
RUN npm run build --workspaces
# Production stage
FROM --platform=$TARGETPLATFORM debian:testing-20250203
@@ -27,11 +27,11 @@ RUN apt-get update && apt-get install -y \
WORKDIR /app
# Install only production dependencies
COPY package*.json ./
COPY backend/package*.json ./
RUN npm ci --production
# Copy built files
COPY --from=builder /app/build ./build
COPY --from=builder /app/backend/build ./build
COPY --from=builder /app/frontend/dist ./dist/frontend
EXPOSE 3000