api-docs / Dockerfile
Hanzo Dev
Optimize Docker for faster startup
d8886c0
raw
history blame
387 Bytes
FROM node:20-slim
WORKDIR /app
# Copy only package files first for better caching
COPY package*.json ./
# Install dependencies with legacy peer deps
RUN npm ci --legacy-peer-deps
# Copy the rest of the application
COPY . .
# Build the Next.js app
RUN npm run build
# Expose the port
EXPOSE 3000
# Use Node directly to avoid npm overhead
CMD ["node", ".next/standalone/server.js"]