All checks were successful
Build and Push Docker Image / build (push) Successful in 12m44s
@tremor/react@3.18.7 requires react@^18 but project uses react@19. Adding .npmrc with legacy-peer-deps=true and copying it in Dockerfiles so npm ci resolves correctly. Also fix implicit any in seed file. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
41 lines
1.1 KiB
Docker
41 lines
1.1 KiB
Docker
# =============================================================================
|
|
# MOPC Platform - Development Dockerfile (Pre-built)
|
|
# =============================================================================
|
|
|
|
FROM node:22-alpine
|
|
|
|
WORKDIR /app
|
|
|
|
# Install dependencies for Prisma and development
|
|
RUN apk add --no-cache libc6-compat openssl
|
|
|
|
# Copy package files
|
|
COPY package.json package-lock.json* .npmrc* ./
|
|
|
|
# Install dependencies
|
|
RUN npm install && npm install tailwindcss-animate
|
|
|
|
# Copy prisma schema for generation
|
|
COPY prisma ./prisma
|
|
|
|
# Generate Prisma client
|
|
RUN npx prisma generate
|
|
|
|
# Copy the rest of the application
|
|
COPY . .
|
|
|
|
# Build the application at build time (pre-compile everything)
|
|
# Dummy env vars needed so Next.js can collect page data without MinIO throwing
|
|
ENV MINIO_ACCESS_KEY=build-placeholder
|
|
ENV MINIO_SECRET_KEY=build-placeholder
|
|
RUN npm run build
|
|
# Clear build-time placeholders (runtime uses real values from docker-compose)
|
|
ENV MINIO_ACCESS_KEY=
|
|
ENV MINIO_SECRET_KEY=
|
|
|
|
# Expose port
|
|
EXPOSE 3000
|
|
|
|
# Start production server (uses pre-built files)
|
|
CMD ["npm", "start"]
|