mad-lawsuit/frontend/Dockerfile
TheMaddax 329f88d374 Fix frontend port configuration: Update Dockerfile to use port 806
- Changed EXPOSE from 3000 to 806
- Added PORT=806 environment variable
- Updated health check to use port 806
- Fixes admin login network error by aligning with docker-compose.yml 806:806 mapping
2025-06-25 15:02:36 -05:00

32 lines
537 B
Docker

FROM node:20-alpine
# Set working directory
WORKDIR /app
# Install pnpm
RUN npm install -g pnpm
# Copy package files
COPY package.json pnpm-lock.yaml* ./
# Install dependencies
RUN pnpm install --frozen-lockfile
# Copy source code
COPY . .
# Build the application
RUN pnpm build
# Expose port
EXPOSE 806
# Set port environment variable
ENV PORT=806
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD curl -f http://localhost:806 || exit 1
# Start the application
CMD ["pnpm", "start"]