Deploying an iTop App
Introduction
iTop is an open-source IT service management and CMDB platform. This guide shows how to containerize iTop with a Dockerfile, connect it to MySQL, persist configs and data, and deploy it to Klutch.sh over HTTP.
Prerequisites
- GitHub repository containing your Dockerfile.
- MySQL database (managed or deployed separately).
- Klutch.sh project ready in klutch.sh/app.
Project structure
.└── DockerfileSample Dockerfile
FROM combodo/itop:latest
# Default iTop portENV APACHE_PORT=80EXPOSE 80Required environment variables
ITOP_DB_HOST– MySQL host and port (e.g.,db:3306)ITOP_DB_NAMEITOP_DB_USERITOP_DB_PASSWORDITOP_ADMIN_PASSWORD– initial admin passwordAPACHE_PORT=80
Optional environment variables
ITOP_ENV=productionITOP_BASE_URL=https://example-app.klutch.shPHP_MEMORY_LIMIT=512M
Persistence
Persist configurations, extensions, and uploads:
- Mount path:
/var/www/html/conf - Mount path:
/var/www/html/data - Size: based on expected attachments, logs, and extensions
Networking
- Protocol: HTTP
- Internal port:
80 - Users reach
https://example-app.klutch.shwhile Klutch.sh routes to port80inside the container.
Health check (recommended)
curl -I http://localhostDeployment on Klutch.sh
- Push your Dockerfile to GitHub.
- In klutch.sh/app, create a new app and select GitHub as the source.
- Klutch.sh automatically detects the Dockerfile in the repository root.
- Select HTTP traffic and set the internal port to
80. - Add environment variables for the database connection (
ITOP_DB_HOST,ITOP_DB_NAME,ITOP_DB_USER,ITOP_DB_PASSWORD),ITOP_ADMIN_PASSWORD, and any optional settings. Mark secrets as sensitive. - Attach persistent volumes at
/var/www/html/confand/var/www/html/datasized for configs, extensions, and uploads. - Deploy. After the app starts, complete the iTop web installer to finalize schema and admin setup.
Verification
-
UI: open
https://example-app.klutch.shand confirm the iTop installer or login page loads. -
Quick check:
Terminal window curl -I https://example-app.klutch.sh
Next steps
- Configure email and authentication providers within iTop.
- Enable regular backups for MySQL and the mounted volumes.
- Tune PHP memory limits and enable extensions as needed for your modules.