FROM node:20-alpine # Install curl for healthcheck RUN apk add --no-cache curl # Enable pnpm RUN corepack enable && corepack prepare pnpm@latest --activate WORKDIR /app # Copy files COPY . . # Install dependencies RUN pnpm install --frozen-lockfile # Build SvelteKit app RUN pnpm run build EXPOSE 3000 ENV NODE_ENV=production # Healthcheck using curl (more reliable on Coolify) HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \ CMD curl -fs http://localhost:3000/_healthz || exit 1 CMD ["node", "build"]