Update Dockerfile

This commit is contained in:
kleap-admin 2026-01-16 17:07:20 +00:00
parent f79ee91e48
commit 6cc90252a2
1 changed files with 36 additions and 0 deletions

36
Dockerfile Normal file
View File

@ -0,0 +1,36 @@
# Kleap Auto-Generated Dockerfile
# DO NOT use Nixpacks - it causes Docker buildx cache mount deadlocks
# See coolify-deployer.ts for full explanation
FROM node:22-alpine
# Install build dependencies for native modules (sharp, etc.)
# bash: Required for build scripts that use bash
# libc6-compat: Required for sharp on Alpine
# python3 make g++: Required for node-gyp builds
RUN apk add --no-cache bash libc6-compat python3 make g++
WORKDIR /app
# Copy package files first (for better Docker layer caching)
COPY package*.json ./
# ╔═══════════════════════════════════════════════════════════════════════════╗
# ║ CRITICAL: NO --mount=type=cache HERE! ║
# ║ ║
# ║ Nixpacks generates: RUN --mount=type=cache,id=xxx,target=/root/.npm ... ║
# ║ This causes DEADLOCK on Coolify/Hetzner Docker buildx. ║
# ║ ║
# ║ We use simple RUN without cache mount = reliable builds every time. ║
# ╚═══════════════════════════════════════════════════════════════════════════╝
RUN npm install --legacy-peer-deps
# Copy source code
COPY . .
# Build the Next.js app
RUN npm run build
# Expose port and start
EXPOSE 3000
CMD ["npm", "start"]