Deployment
Production Docker builds, horizontal scaling, and clustering with Nginx load balancer.
Docker Hub
RecommendedPull the pre-built image from Docker Hub. For local initialization, use Node.js 24 and Docker Compose v2.20+. Configure production settings before exposing the server.
curl --fail --location -o docker-compose.yml https://raw.githubusercontent.com/idenplane/idenplane/main/docker-compose.yml
curl --fail --location -o setup-env.cjs https://raw.githubusercontent.com/idenplane/idenplane/main/scripts/setup-env.cjs
node setup-env.cjs
docker compose up -d --wait --wait-timeout 180
# Before production: set BASE_URL, pin IDENPLANE_IMAGE,
# and configure HTTPS and durable backups.
Uses the islamawad/idenplane:latest image with PostgreSQL 16 Alpine.
Build from Source
Build the Docker image locally from the source code. Useful if you need custom modifications.
git clone https://github.com/idenplane/idenplane.git
cd idenplane
# Build and start
docker compose -f docker-compose.dev.yml up -d --build Multi-Stage Dockerfile
The Dockerfile uses a multi-stage build (on node:24-alpine, pinned by digest) to produce a lean production image:
Dependencies
Installs backend and Admin UI Node.js dependencies via npm ci (two parallel stages)
Build
Builds React Admin UI, generates Prisma client, compiles NestJS backend
Production
Final node:24-alpine image with production-only node_modules/ (npm ci --omit=dev), plus dist/, prisma/, and themes/; runs as the non-root node user
Container Entrypoint
The Docker entrypoint script (docker-entrypoint.sh) runs automatically on every container start:
- 1
Validates that
DATABASE_URLis set, and in production thatADMIN_API_KEYis set and not a known default (exits with a helpful error otherwise) - 2
Runs
npx prisma migrate deployto apply any pending database migrations - 3
Launches the server with
node dist/cluster.js(one process, or one worker per CPU withWEB_CONCURRENCY)
Horizontal Scaling
Idenplane keeps its state in PostgreSQL (and optionally Redis), so you can run several instances behind a load balancer sharing the same database. For several instances, use Redis as the session store.
Cluster with Nginx
Use the cluster compose file to run 2 instances behind an Nginx reverse proxy:
docker compose -f docker-compose.cluster.yml up -d Cluster Topology
┌────────────────────────────────────────────┐
│ Nginx Load Balancer │
│ :8081 → :80 │
└─────────┬──────────────────┬───────────────┘
│ │
┌───────┴──────┐ ┌───────┴──────┐
│ Idenplane #1 │ │ Idenplane #2 │
│ :3000 │ │ :3000 │
└───────┬──────┘ └───────┬──────┘
│ │
┌───────┴──────────────────┴───────┐
│ PostgreSQL 16 │
│ (shared) │
└──────────────────────────────────┘ Nginx Configuration
upstream idenplane {
ip_hash;
server app1:3000;
server app2:3000;
}
server {
listen 80;
server_name _;
location / {
proxy_pass http://idenplane;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
} Manual Scaling
Scale to any number of instances using the Docker Compose scale flag. The default compose file publishes the app on a fixed host port (127.0.0.1:3000), which only one replica can bind, so remove that mapping and put a load balancer in front first:
docker compose up -d --scale app=3