Files
hive/frontend/Dockerfile
anthonyrawlins b6bff318d9 WIP: Save current work before CHORUS rebrand
- Agent roles integration progress
- Various backend and frontend updates
- Storybook cache cleanup

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-01 02:20:56 +10:00

37 lines
796 B
Docker

FROM node:18-alpine
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies (including dev deps for build)
RUN npm install && npm install -g serve
# Copy source code
COPY . .
# Install curl for health checks (as root)
RUN apk add --no-cache curl
# Create non-root user
RUN addgroup -g 1001 -S nodejs
RUN adduser -S nextjs -u 1001
# Build the application (with cache busting)
ARG BUILD_DATE
RUN echo "Building at: $BUILD_DATE" && npm run build
# Change ownership
RUN chown -R nextjs:nodejs /app
USER nextjs
# Expose port
EXPOSE 3000
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:3000 || exit 1
# Start the application using serve for production
CMD ["serve", "-s", "dist", "-l", "3000"]