task_receipts/client/Dockerfile

33 lines
629 B
Docker

# Build stage
FROM node:18 AS builder
WORKDIR /app
# Copy root package files for workspaces
COPY package.json ./
COPY package-lock.json ./
# Copy client and shared code
COPY client/ ./client/
COPY shared/ ./shared/
# Install dependencies for client workspace
RUN npm ci --workspace=client
# Build the client
WORKDIR /app/client
RUN npm run build
# Production stage
FROM nginx:stable
COPY --from=builder /app/client/dist /usr/share/nginx/html
# Copy nginx configuration (optional - using default for now)
# COPY nginx.conf /etc/nginx/nginx.conf
# Expose port 80
EXPOSE 80
# Start nginx
CMD ["nginx", "-g", "daemon off;"]