Nginx gateway for the ZinTrust proxy stack — routes MySQL, Postgres, Redis, SMTP and more.
2.4K
zintrust/zintrust-proxy-gatewayThe ZinTrust Proxy Gateway is a high-performance Nginx reverse proxy that acts as the single entry point for all protocol-aware proxy services in the ZinTrust proxy stack. It routes HTTP requests to the correct backing proxy container (MySQL, PostgreSQL, Redis, MongoDB, SQL Server, or SMTP) and provides failover, keep-alive connection reuse, and a unified health endpoint.
Companion image:
zintrust/zintrust-proxy — the Node.js runtime image for each individual protocol proxy.
| Component | Detail |
|---|---|
| Base | nginx:1.27-alpine |
| Listen port | 8080 |
| Arch | linux/amd64, linux/arm64 |
| Worker connections | 8 192 per worker |
| Max open files | 200 000 |
| Path prefix | Proxied to | Default port |
|---|---|---|
/mysql/* | proxy-mysql | 8789 |
/postgres/* | proxy-pg | 8790 |
/redis/* | proxy-redis | 8791 |
/mongodb/* | proxy-mongodb | 8792 |
/sqlserver/* | proxy-sqlserver | 8793 |
/smtp/* | proxy-smtp | 8794 |
/health | Built-in (gateway self) | — |
The path prefix is stripped before forwarding, so /mysql/health is received by the MySQL proxy as /health.
8800 by default) for all proxy traffic.error, timeout, 502, 503, 504.proxy_http_version 1.1 + Connection: "" for connection reuse.epoll, multi_accept, reuseport, keepalive_requests 10000.GET /health returns {"status":"ok","service":"proxy-gateway"} without hitting any upstream.docker-compose.proxy.yml compose file.Use the docker-compose.proxy.yml file from the ZinTrust repository. The gateway is declared as the proxy-gateway service and is exposed on port 8800.
# 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
Once running, verify the gateway:
curl http://localhost:8800/health
# {"status":"ok","service":"proxy-gateway"}
# Reach a specific proxy through the gateway
curl http://localhost:8800/mysql/health
curl http://localhost:8800/postgres/health
curl http://localhost:8800/redis/health
The gateway itself uses no application-level env vars. The following compose-level variables control how it is launched:
| Variable | Default | Description |
|---|---|---|
PROXY_GATEWAY_IMAGE | zintrust/zintrust-proxy-gateway:latest | Override the image tag |
PROXY_GATEWAY_PORT | 8800 | Host port mapped to the gateway's 8080 |
PROXY_PULL_POLICY | if_not_present | Docker pull policy |
PROXY_GATEWAY_HEALTHCHECK_DISABLE | false | Disable Docker health check |
| Tag | Notes |
|---|---|
latest | Latest stable release |
x.y.z | Pinned release (recommended for production) |
Use the ZinTrust CLI to push updated images to Docker Hub:
# Push both images
zin cp publish-images --tag 1.2.0
# Push only the gateway image
zin cp publish-images --tag 1.2.0 --only gateway
Content type
Image
Digest
sha256:b0fa6dc84…
Size
20 MB
Last updated
4 months ago
docker pull zintrust/zintrust-proxy-gateway:sha-6e8f833