diff --git a/frontend/Dockerfile b/frontend/Dockerfile index dd7a52c..4d231be 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -21,6 +21,8 @@ FROM node:22-alpine AS builder WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY . . +# Cap node heap so a build on a small VPS can't OOM-kill neighbours. +ENV NODE_OPTIONS=--max-old-space-size=1536 RUN corepack enable && pnpm build # Production: Hono serves dist/ + /api/copilotkit on port 3000 @@ -34,4 +36,4 @@ COPY server.ts package.json ./ EXPOSE 3000 HEALTHCHECK --interval=30s --timeout=3s --retries=3 \ CMD wget -qO- http://127.0.0.1:3000/api/health || exit 1 -CMD ["sh", "-c", "corepack enable && tsx server.ts"] +CMD ["./node_modules/.bin/tsx", "server.ts"]