Skip to content

ZinTrust Docker Images

ZinTrust ships a single monolith runtime image used across app runtime, workers, schedules, and proxy services.

The proxy stack also has a companion gateway image.

Companion image: zintrust/zintrust-proxy-gateway — the Nginx-based gateway that routes and load-balances across all running proxy containers.


What's inside

ComponentDetail
Basenode:20-alpine
Entrypointzin CLI (dist/bin/zin.js)
Archlinux/amd64, linux/arm64

Each proxy type is activated by passing a command to the runtime container:

ProxyCommandInternal port
MySQLproxy:mysql8789
PostgreSQLproxy:postgres8790
Redisproxy:redis8791
MongoDBproxy:mongodb8792
SQL Serverproxy:sqlserver8793
SMTPproxy:smtp8794

Key features

  • Connection pooling — each proxy manages a pool toward the real backing service, reducing per-request overhead.
  • Request signing — HMAC-based signing window prevents unauthenticated traffic from reaching your databases.
  • Health endpoints — every proxy exposes a GET /health endpoint used by Docker health checks and the gateway.
  • Multi-runtime — works with ZinTrust apps running in Node.js or Cloudflare Workers (via the gateway).
  • Zero build step — pull and run; no local compile needed.

Quick start

The fastest way to run the full proxy stack is via the docker-compose.proxy.yml file included in the ZinTrust repository.

bash
# Pull the compose file
curl -O https://raw.githubusercontent.com/ZinTrust/zintrust/master/docker-compose.proxy.yml

# Create a minimal env file
cat > .env.proxy <<'EOF'
APP_KEY=change-me-to-a-long-random-string
DOCKER_DB_HOST=host.docker.internal
DOCKER_REDIS_HOST=host.docker.internal
DB_DATABASE=zintrust
DB_USERNAME=root
DB_PASSWORD=secret
EOF

# Start the stack
docker compose -f docker-compose.proxy.yml --env-file .env.proxy up -d

The gateway will be available at http://localhost:8800.


Environment variables

Shared (all proxies)

VariableDefaultDescription
NODE_ENVproductionRuntime environment (Compose default)
APP_NAMEZinTrustApplication name
APP_KEY(required)Secret used for signing

Operational (Docker Compose only)

These are Docker-only tuning knobs used by docker-compose.proxy.yml:

VariableDefaultDescription
PROXY_PULL_POLICYalwaysDocker Compose pull policy for proxy images
PROXY_MEM_LIMIT512mMemory limit per proxy container
PROXY_CPUS1.0CPU limit per proxy container
PROXY_PIDS_LIMIT512PID limit per proxy container
PROXY_LOG_MAX_SIZE10mLog rotation max size (json-file driver)
PROXY_LOG_MAX_FILE3Log rotation max files
PROXY_GATEWAY_*Gateway overrides: MEM_LIMIT/CPUS/PIDS

MySQL proxy

VariableDefaultDescription
MYSQL_DB_HOSThost.docker.internalTarget MySQL host
MYSQL_DB_PORT3306Target MySQL port
MYSQL_DB_DATABASEzintrustDatabase name
MYSQL_DB_USERNAMEzintrustDatabase user
MYSQL_DB_PASSWORDsecretDatabase password
MYSQL_PROXY_KEY_IDSigning key ID
MYSQL_PROXY_SECRETSigning secret
MYSQL_PROXY_POOL_LIMIT100Max pool connections

PostgreSQL proxy

VariableDefaultDescription
DB_HOSThost.docker.internalTarget Postgres host
DB_PORT_POSTGRESQL5432Target Postgres port
DB_DATABASE_POSTGRESQLpostgresDatabase name
DB_USERNAME_POSTGRESQLpostgresDatabase user
DB_PASSWORD_POSTGRESQLpostgresDatabase password
POSTGRES_PROXY_KEY_IDSigning key ID
POSTGRES_PROXY_SECRETSigning secret
POSTGRES_PROXY_POOL_LIMIT100Max pool connections

Redis proxy

VariableDefaultDescription
REDIS_PROXY_TARGET_HOSThost.docker.internalTarget Redis host
REDIS_PROXY_TARGET_PORT6379Target Redis port
REDIS_PROXY_TARGET_PASSWORDRedis password
REDIS_PROXY_TARGET_DB0Redis DB index
REDIS_PROXY_KEY_IDSigning key ID
REDIS_PROXY_SECRETSigning secret

SMTP proxy

VariableDefaultDescription
MAIL_HOST(required)SMTP server host
MAIL_PORT587SMTP port
MAIL_SECUREfalseUse TLS
MAIL_USERNAME(required)SMTP username
MAIL_PASSWORD(required)SMTP password
SMTP_PROXY_KEY_IDSigning key ID
SMTP_PROXY_SECRETSigning secret

Image tags

TagNotes
latestLatest stable release
x.y.zPinned release (recommended for production)

Publishing (maintainers)

Use the ZinTrust CLI to build and push images to Docker Hub:

bash
# Push runtime (zintrust/zintrust) + gateway (zintrust/zintrust-proxy-gateway)
zin docker push --tag 1.2.0

# Push only the runtime image
zin docker push --tag 1.2.0 --only runtime

# Push only the gateway image
zin docker push --tag 1.2.0 --only gateway

Released under the MIT License.