foundary-test-1770684712/apps/studio-ui/Dockerfile
jordan 51a0f09d17
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Add components: app-react/studio-ui, service/studio-api
2026-02-10 01:23:53 +00:00

35 lines
829 B
Docker

# Build stage - using pnpm for workspace dependency resolution
FROM node:20-alpine AS build
# Install pnpm
RUN npm install -g pnpm
WORKDIR /workspace
# Copy workspace configuration files
COPY pnpm-workspace.yaml package.json pnpm-lock.yaml* ./
# Copy shared packages (required for workspace:* dependencies)
COPY packages/ ./packages/
# Copy the app component
COPY apps/studio-ui/ ./apps/studio-ui/
# Install dependencies using pnpm (resolves workspace:* correctly)
RUN pnpm install --frozen-lockfile || pnpm install
# Build the app
WORKDIR /workspace/apps/studio-ui
RUN pnpm build
# Production stage
FROM nginx:alpine
# Copy built assets
COPY --from=build /workspace/apps/studio-ui/dist /usr/share/nginx/html
COPY apps/studio-ui/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 3001
CMD ["nginx", "-g", "daemon off;"]