Skip to content
← All packages

Cbox Init

PID 1 process manager for Docker containers. Handles signal forwarding, zombie reaping, PHP-FPM auto-tuning, health checks, and Prometheus metrics.

The problem with PHP in containers

Most PHP Docker setups use supervisord or a shell script as the entrypoint. Neither is a proper PID 1. Zombie processes accumulate, signals get lost, and health checks are an afterthought. Cbox Init is a process manager built specifically for PHP in containers.

It handles signal forwarding, zombie reaping, multi-process orchestration, and PHP-FPM auto-tuning in a single static binary. No runtime dependencies, no configuration files to maintain for simple setups.

Built for PHP

PID 1 Process Manager

Proper signal handling (SIGTERM, SIGINT, SIGQUIT), zombie reaping, and clean process tree management. No orphaned workers.

PHP-FPM Auto-Tuning

Reads cgroup memory and CPU limits, applies application profiles (dev, light, medium, heavy, bursty), and calculates optimal worker counts automatically.

Multi-Process Orchestration

DAG-based dependency management with priority-based startup. Run PHP-FPM, Nginx, queue workers, cron, and schedulers in a single container.

Health Monitoring

TCP, HTTP, and exec-based health checks with configurable success thresholds. File-based Kubernetes readiness probes.

Scheduled Tasks

Built-in cron scheduler with per-task statistics. Heartbeat monitoring integration with Healthchecks.io, Cronitor, and Better Uptime.

Framework Scaffolding

Generate configs for Laravel, Symfony, WordPress, Magento, Drupal, Next.js, Nuxt, and Node.js with a single command.

Auto-tuning for real workloads

Instead of guessing pm.max_children, Cbox Init reads your container resource limits and applies application profiles. A "heavy" Laravel app with 512MB gets different settings than a "light" API service with 2GB. The calculator considers memory per worker, CPU cores, and safety margins.

Quick start

Add Cbox Init to any PHP Docker image with a single COPY instruction: COPY --from=cboxdk/init:latest /usr/local/bin/init /usr/local/bin/init. Then use init as your ENTRYPOINT.

Observability built in

Every process exposes Prometheus metrics, and the REST API gives you runtime control over scaling, process restarts, and configuration changes. The terminal UI (TUI) provides a k9s-style interface for interactive management during debugging.

The Cbox Init terminal UI showing process status, resource usage, and health check results.