Deploying an ILLA App
Introduction
ILLA is an open-source low-code platform for building internal tools with a React/Node.js stack, backed by PostgreSQL and Redis. Deploying ILLA with a Dockerfile on Klutch.sh gives you reproducible builds, managed secrets, and persistent storage for apps, assets, and configuration—all managed from klutch.sh/app. This guide walks through installation, repository prep, a production-ready Dockerfile, deployment steps, Nixpacks overrides, and best practices.
Prerequisites
- A Klutch.sh account (create one)
- A GitHub repository containing your ILLA code (GitHub is the only supported git source)
- Docker familiarity and Node.js 18+ for local testing
- PostgreSQL and Redis credentials
- Optional object storage credentials for large assets
For first-time setup, skim the Quick Start.
Architecture and ports
- Serve ILLA over HTTP; set the internal container port to
9001(common default for ILLA Builder). - Run PostgreSQL and Redis as separate Klutch.sh TCP apps. Expose them on port
8000and connect internally on ports5432(Postgres) and6379(Redis). - Persistent storage is recommended for user projects, uploads, and cached assets.
Repository layout
illa/├── apps/builder/ # Frontend and server logic├── packages/ # Shared libraries├── public/ # Static assets├── storage/ # User uploads and cached data (mount as a volume)├── Dockerfile # Must be at repo root for auto-detection├── package.json├── pnpm-lock.yaml # or yarn.lock / package-lock.json└── .env.example # Template only; no secretsKeep secrets out of Git; store them in Klutch.sh environment variables.
Installation (local) and starter commands
Install dependencies and build locally before pushing to GitHub:
pnpm installpnpm buildpnpm start -- --port 9001If your project uses migrations or seed scripts, add:
pnpm prisma migrate deployOptional helper start.sh for portability and Nixpacks fallback:
#!/usr/bin/env bashset -euo pipefailpnpm prisma migrate deploy || truepnpm start -- --port 9001Make it executable with chmod +x start.sh.
Dockerfile for ILLA (production-ready)
Place this Dockerfile at the repository root; Klutch.sh auto-detects it (no Docker toggle in the UI):
FROM node:18-alpine AS buildWORKDIR /app
COPY package.json pnpm-lock.yaml* yarn.lock* package-lock.json* ./RUN corepack enableRUN pnpm install --frozen-lockfile
COPY . .RUN pnpm build
FROM node:18-alpineWORKDIR /appENV NODE_ENV=production PORT=9001
COPY --from=build /app /appRUN corepack enable && pnpm install --prod --frozen-lockfile
EXPOSE 9001CMD ["pnpm", "start", "--", "--port", "9001"]Notes:
- Add Alpine build tools if native modules are required (for example,
apk add --no-cache python3 make g++). - Keep
storage/writable and mount it as a volume in Klutch.sh for uploads and project data.
Environment variables (Klutch.sh)
Set these in the Klutch.sh app settings (Secrets tab) before deploying:
NODE_ENV=productionPORT=9001APP_BASE_URL=https://example-app.klutch.shDATABASE_URL=postgres://<user>:<password>@<host>:<port>/<db>REDIS_URL=redis://<user>:<password>@<host>:<port>JWT_SECRET=<jwt-secret>STORAGE_DIR=/app/storage/uploads(or your chosen path)NEXT_PUBLIC_APP_URL=https://example-app.klutch.sh(if the frontend needs it)
If you deploy without the Dockerfile and want Nixpacks overrides:
NIXPACKS_BUILD_CMD=pnpm install --frozen-lockfile && pnpm buildNIXPACKS_START_CMD=pnpm start -- --port 9001NIXPACKS_NODE_VERSION=18
These keep ILLA compatible with Nixpacks defaults when a Dockerfile is absent.
Attach persistent volumes
In Klutch.sh storage settings, add mount paths and sizes (names are not required):
/app/storage/uploads— for user-generated content and exports./app/.cache— optional cache to speed rebuilds if your app writes there.
Ensure these paths are writable inside the container.
Deploy ILLA on Klutch.sh (Dockerfile workflow)
- Push your repository (with the Dockerfile at the root) to GitHub.
- Open klutch.sh/app, create a project, and add an app.
- Connect the GitHub repository; Klutch.sh automatically detects the Dockerfile.
- Choose HTTP traffic for ILLA.
- Set the internal port to
9001. - Add the environment variables above (database, Redis, auth secrets, and any
NIXPACKS_*overrides if you temporarily deploy without the Dockerfile). - Attach persistent volumes for
/app/storage/uploads(and/app/.cacheif used), choosing sizes that fit your data needs. - Deploy. Your app will be reachable at
https://example-app.klutch.sh; attach a custom domain if desired.
For PostgreSQL or Redis on Klutch.sh, create separate TCP apps, expose them on port 8000, and point DATABASE_URL or REDIS_URL to those endpoints (internal ports 5432/6379).
Health checks and production tips
- Add a lightweight health endpoint (e.g.,
/api/health) that checks DB/Redis connectivity. - Keep lockfiles committed and Node versions pinned for reproducible builds.
- Monitor storage usage on mounted paths and resize before they fill.
- Back up your database regularly; do not rely on container filesystems for durability.
- Use structured logging and ship logs to your observability stack.
ILLA on Klutch.sh combines reproducible Docker builds with managed secrets, persistent volumes, and flexible HTTP/TCP routing. With the Dockerfile at the repo root and ports set to 9001 for the app (8000 externally for TCP databases or caches), you can deliver internal tools reliably without extra YAML or workflow overhead.