Skip to content

Docker Compose ​

The hub-deployment repository provides a ready-to-use Docker Compose setup that orchestrates all Hub services with their infrastructure dependencies.

WARNING

The Docker Compose setup is suited for testing and development only. For production deployments, use the Kubernetes (Helm) approach.

Prerequisites ​

  • Docker and Docker Compose
  • An external Harbor registry (not included in the compose stack)

Quick Start ​

bash
# Clone the deployment repository
git clone https://github.com/PrivateAIM/hub-deployment.git
cd hub-deployment/docker-compose

# Configure environment
cp .env.example .env
# Edit .env as needed

# Start all services
docker compose up -d

The stack will be available at http://localhost:3000 via the Nginx reverse proxy.

Services ​

The compose stack includes:

Infrastructure ​

ServiceImagePurpose
postgresPostgreSQL 18Shared database
redisRedis 8Pub/sub and caching
rabbitmqRabbitMQ 3 (management)Message queue
minioMinIOObject storage (S3-compatible)
victoria-logsVictoriaLogsLog aggregation
grafanaGrafanaMonitoring dashboards

Hub Services ​

ServiceCommandPurpose
authup—Authentication (OAuth2)
corecore cli startMain REST API
core-worker—Background worker (Docker execution)
storage—File/object storage
messenger—Real-time messaging
telemetry—Log collection
ui—Frontend application
nginx—Reverse proxy (port 3000)

Networking ​

All services run on a bridge network (hub) with a configurable subnet (default: 172.40.1.0/24).

Nginx routes requests by path prefix:

PathService
/UI
/core/Core API (WebSocket enabled)
/auth/Authup
/storage/Storage
/telemetry/Telemetry
/messenger/Messenger (WebSocket enabled)

Environment Variables ​

Create a .env file from the provided .env.example:

bash
# Hub image configuration
HUB_IMAGE=ghcr.io/privateaim/hub
HUB_IMAGE_TAG=latest
SUBNET=172.40.1.0/24
VariableDefaultDescription
HUB_IMAGEghcr.io/privateaim/hubHub Docker image name
HUB_IMAGE_TAGlatestImage version tag
SUBNET172.40.1.0/24Docker network subnet
HARBOR_URL—Container registry (<user>:<passwd>@<host>, no https://)
AUTHUP_PUBLIC_URLhttp://localhost:3000/auth/Public auth URL
CORE_PUBLIC_URLhttp://localhost:3000/core/Public core API URL
STORAGE_PUBLIC_URLhttp://localhost:3000/storage/Public storage URL
TELEMETRY_PUBLIC_URLhttp://localhost:3000/telemetry/Public telemetry URL
COOKIE_DOMAINlocalhostCookie domain for auth
MQ_CONNECTION_URLamqp://root:start123@172.40.1.1RabbitMQ connection

See Configuration for service-specific environment variables.