Docker & deployment

Zero-config by default, and switchable to a real production database with environment variables only - no image rebuild, no code change.

Required: an admin password

Toolize ships with no default admin credential and refuses to start without TOOLIZE_ADMIN_PASSWORD set explicitly. This is deliberate: a well-known default password is the single most common way self-hosted tools get compromised.

TOOLIZE_ADMIN_USERNAME is optional and defaults to admin - only the password is required.

Default: embedded database

With no further configuration, Toolize stores everything in an embedded, file-based H2 database under /data - ideal for trying it out, small deployments, or a single-instance self-host.

terminal
docker run -p 8080:8080 -v toolize-data:/data \
  -e TOOLIZE_ADMIN_PASSWORD=change-me \
  ghcr.io/kouskous/toolize:latest

Production: PostgreSQL, MySQL, or Oracle

Set TOOLIZE_DB_TYPE and a handful of matching variables to point Toolize at a real database instead:

terminal · PostgreSQL
docker run -p 8080:8080 -v toolize-data:/data \
  -e TOOLIZE_ADMIN_PASSWORD=change-me \
  -e TOOLIZE_DB_TYPE=POSTGRESQL \
  -e TOOLIZE_DB_HOST=db.example.com \
  -e TOOLIZE_DB_PORT=5432 \
  -e TOOLIZE_DB_NAME=toolize \
  -e TOOLIZE_DB_USERNAME=toolize \
  -e TOOLIZE_DB_PASSWORD=change-me \
  ghcr.io/kouskous/toolize:latest

TOOLIZE_DB_TYPE also accepts MYSQL and ORACLE - same variables, same command shape.

Environment variables reference

VariableRequiredNotes
TOOLIZE_ADMIN_PASSWORDYesNo default - Toolize won't start without it.
TOOLIZE_ADMIN_USERNAMENoDefaults to admin.
TOOLIZE_DB_TYPENoPOSTGRESQL, MYSQL, or ORACLE. Omit to keep the embedded H2 database.
TOOLIZE_DB_HOSTWith TOOLIZE_DB_TYPEUse host.docker.internal for a database on the host machine.
TOOLIZE_DB_PORTNoDefaults to the database's standard port (5432 / 3306 / 1521).
TOOLIZE_DB_NAMEWith TOOLIZE_DB_TYPE 
TOOLIZE_DB_USERNAME / TOOLIZE_DB_PASSWORDWith TOOLIZE_DB_TYPE 
TOOLIZE_DATA_DIRNoDefaults to /data; where the embedded database and logs live.

Running multiple replicas

Toolize is safe to run as several replicas behind a load balancer, pointed at the same production database:

  • Every instance re-reads all projects from the shared database and refreshes its in-memory tool registry every 15 seconds, so a change made through one replica (a new import, an endpoint toggle, a description edit) reaches every other replica without a restart.
  • Per-tool usage stats (call counts, error rate, recent calls) are stored in the shared database too, so every replica reports the same numbers.
  • Because configuration is plain environment variables rather than a file on local disk, a Kubernetes Deployment can source them from a Secret and every pod connects identically - nothing is tied to any one pod's local storage.

Building from source

Prefer to build the image yourself instead of pulling the published one:

terminal
docker build -t toolize .
docker run -p 8080:8080 -v toolize-data:/data \
  -e TOOLIZE_ADMIN_PASSWORD=change-me \
  toolize