Skip to main content

Docker Deployment

When to Use It​

  • Local development and debugging
  • Quickly evaluating the complete platform
  • Environments that do not need Kubernetes, Operator, or Cilium
  • Single-host deployments

Requirements​

  • Docker (24.0+ recommended)
  • Docker Compose (V2, usually included with Docker Desktop)
  • Git LFS (optional; required when a Knowledge Base enables Git LFS and manages large files under raw/)
  • At least 4 vCPUs
  • At least 8 GB of available memory
  • 12–16 GB of available memory recommended for more stable browser and agent workflows
  • At least 30 GB of free disk space
  • 50 GB of free disk space recommended to avoid images, volumes, and workspace data quickly exhausting storage

Service Architecture​

In Docker mode, the root docker compose manages only the control plane. Workspace Manager uses the Docker API to create an isolated execution plane for each running Workspace:

Frontend / Manager / external OIDC or bundled Keycloak
|
Workspace Manager + Docker API
|
+-------------------------------------+
| Workspace A: Runtime/Browser/Canvas |
| Workspace B: Runtime/Browser/Canvas |
+-------------------------------------+

PostgreSQL and Redis provide control-plane infrastructure.

Services​

ServiceImageDescription
postgrespostgres:15-alpinePrimary platform database
redisredis:7-alpineTask queue (Celery broker), result backend, and session management
local-oidc-configpython:3.12-alpineOne-shot Keycloak realm rendering from mounted Secret files; exits after success
keycloak${PLATFORM_KEYCLOAK_IMAGE}Native-user OIDC provider and Admin Console for the local-oidc profile
turn-readiness-preflightailerondocker/workspace-manager:devValidates the TURN profile, secret bundle, image, and relay ports before startup
coturn${COTURN_IMAGE}TURN control listener and relay UDP range
connectivity-evidence-gateway${WORKSPACE_OPERATOR_IMAGE}Accepts host frontend-vantage challenges and evidence
connectivity-external-agent${WORKSPACE_OPERATOR_IMAGE}Runs TURN probes from the host-network frontend vantage
runtime-assertion-key-initailerondocker/workspace-manager:devOne-shot Runtime assertion key generation; exits after success
identity-bootstrapailerondocker/workspace-manager:devOne-shot local platform-role and administrator-snapshot bootstrap; never creates a provider password
workspace-managerailerondocker/workspace-manager:devCore management service: Workspace CRUD, permissions, lifecycle, and dynamic execution-plane provisioning
frontendailerondocker/workspace-ui:devReact + Vite development server

These thirteen names are the complete root Compose service list. Celery worker, Celery Beat, and Flower are not separate Compose services; Supervisor runs them inside the workspace-manager container. Flower is available only on the deployment-internal network.

Manager creates the following containers dynamically for each Workspace; they are not present in the root docker-compose.yml:

ContainerDescription
workspace-runtime-<workspace-id>Agent Runtime, Terminal, file, and Git APIs
workspace-browser-<workspace-id>neko WebRTC browser and CDP
workspace-canvas-<workspace-id>Workspace Canvas rendering and management API
Git LFS and Knowledge Bases

Git version control is optional for each Knowledge Base. The Manager environment needs the git lfs command only when a Knowledge Base enables Git LFS. To track large PDFs, images, archives, or other raw/ source files with LFS, confirm that Git LFS is installed in the workspace-manager image.

See Install and Start for first startup, service-status checks, stopping, and cleanup. docker buildx bake --load local builds all images required by the control plane and execution planes. docker compose up --no-build starts only the control plane; Manager still creates Runtime, Browser, and Canvas dynamically.

In Aileron, the complete Docker Compose stack is both a deployment option and the default local development mode. Daily module development assumes that the full service set is running, with development mounts and each service's reload mechanism reflecting source changes.

See Service Endpoints and Accounts for service URLs, default accounts, and health-check endpoints.

Version and Dependency Ownership​

Each source type owns its versions; neither ops.py nor Compose duplicates them:

TypeSingle sourceRule
Image toolchains such as Python, Node.js, npm, pnpm, uv, Claude Code, Codex, OpenCode, Playwright CLI, and MavenRoot docker-bake.hclDockerfiles accept build arguments with no defaults
Frontend and Canvas npm packagesTheir respective package.json and package-lock.jsonReproduce the lockfile with npm ci
Manager and Runtime Python packagesTheir respective pyproject.toml and uv.lockBuild from a frozen lockfile
Go modulesTheir respective go.mod and go.sumReproduce the Go module lock state
Runtime service images such as PostgreSQL, Redis, and an OIDC adapterdocker-compose.yml or Helm valuesManaged separately from the application build toolchain

When updating a toolchain version, change only docker-bake.hcl and update checksum fields together. Do not add another numeric version to a Dockerfile, Compose file, Makefile, shell script, or ops.py.

Inspect the final Bake resolution without building:

docker buildx bake --print local
docker buildx bake --print release

The RKE2 release script resolves toolchain versions through the same Bake targets before applying Registry, tag, and linux/amd64 settings. Local, CI, and release flows therefore do not maintain build arguments independently.

Environment Variables​

See Environment Variable Reference for the complete list. The variables below can be set in the shell or an .env file and affect overall Docker Compose behavior. Refer to the full environment-variable page for service-specific settings.

VariableDefaultDescription
PLATFORM_PUBLIC_ORIGINhttp://localhost:8082Sole browser-visible Origin; no path or trailing slash
OIDC_ISSUER_URLhttp://localhost:8080/realms/aileronCanonical external Provider issuer
OIDC_CLIENT_IDaileron-managerManager confidential client ID
TZAsia/TaipeiSystem time zone
HOST_PROJECT_ROOT.Absolute path to the project root on the host
HOST_PLATFORM_SECRETS_DIRRequiredDirectory containing PostgreSQL, OIDC client, and platform Secret files
HOST_WORKSPACES_DIR./data/workspace-dataWorkspace data storage path
HOST_WORKSPACE_SCRIPTS_DIR./data/workspace-scriptsWorkspace scripts storage path
HOST_RUNTIME_HOME_DIR./data/runtime-homeRoot for each dynamic Runtime's complete user HOME
WORKSPACE_OPERATOR_IMAGEailerondocker/workspace-operator:devExisting Operator image used by the Gateway, host agent, and Browser probe
COTURN_IMAGEailerondocker/platform-coturn:devCoturn image, supplied locally or by the deployer
PLATFORM_KEYCLOAK_IMAGEailerondocker/platform-keycloak:devProduct-built immutable Keycloak image for local-oidc
HOST_TURN_CONFIG_DIR./data/turn-configHost directory containing the canonical TURN profile
HOST_TURN_SECRETS_DIR./data/turn-secretsDirectory containing the TURN REST, backend/frontend ICE, Coturn, Gateway, and host-agent secret bundle
TURN_CREDENTIAL_REVISIONdocker-compose-v1Credential revision for this installation
TURN_RELAY_MIN_PORT / TURN_RELAY_MAX_PORT49160 / 49180Relay range that must exactly match backend.relayPortRange in the profile
TURN_CONNECTIVITY_GATEWAY_EXTERNAL_PORT18083Gateway host port used by the host agent
VITE_BROWSER_EXTENSION_IDEmptyBrowser-extension capability flag with a proven consumer
.env file

Create .env in the project root and Docker Compose loads it automatically.

Local OIDC Secrets​

When the local-oidc profile is enabled, ${HOST_PLATFORM_SECRETS_DIR} must also contain keycloak-bootstrap-admin-password and local-oidc-platform-admin-password. The former creates the separate Admin Console administrator before Keycloak starts and is then removed from the process environment. The latter is written only to the mode-0600 realm import and defaults to admin123 for an isolated local environment. The OIDC client continues to use the shared oidc-client-secret.

The Aileron platform administrator in the realm and the Manager bootstrap snapshot share BOOTSTRAP_ADMIN_SUBJECT, BOOTSTRAP_ADMIN_USERNAME, and BOOTSTRAP_ADMIN_EMAIL; the default username is admin. The Keycloak Admin Console administrator uses the separate KEYCLOAK_BOOTSTRAP_ADMIN_USERNAME. Passwords are accepted only through mounted Secret files. This profile deploys no OpenLDAP, LDAP seed, or LDAP federation.

TURN readiness bundle​

Dynamic Browsers do not publish per-container WebRTC media ports. Neko uses the same TURN-compatible profile as Kubernetes, and Coturn relays browser traffic to the Browser container on the Compose network.

Docker Compose runs turn-readiness-preflight before Coturn, the Gateway, host agent, Manager, and identity bootstrap. The deployer must create these files; missing, empty, or inconsistent files fail closed:

${HOST_TURN_CONFIG_DIR}/turn-reachability-profile.json
${HOST_TURN_SECRETS_DIR}/turn-rest-shared-secret
${HOST_TURN_SECRETS_DIR}/turn-backend-ice-servers.json
${HOST_TURN_SECRETS_DIR}/turn-frontend-ice-servers.json
${HOST_TURN_SECRETS_DIR}/coturn-auth-secret
${HOST_TURN_SECRETS_DIR}/gateway-internal-token
${HOST_TURN_SECRETS_DIR}/host-agent-token
${HOST_TURN_SECRETS_DIR}/connectivity-agent-tokens.json

turn-rest-shared-secret and coturn-auth-secret must match, while connectivity-agent-tokens.json must contain the same host value as host-agent-token. The profile is the single installation source of truth and must declare credentialIssuer.kind=turnRest, credentialIssuer.secretRef=turn-rest-shared-secret, and a host entry in requiredFrontendVantages. Do not commit the profile or secrets to Git.

Use the repository contract as a local starting point:

mkdir -p data/turn-config data/turn-secrets
cp contracts/browser-connectivity/turn-reachability-profile.json \
data/turn-config/turn-reachability-profile.json
export HOST_PROJECT_ROOT="$PWD"
turn_secret="$(openssl rand -hex 32)"
printf '%s\n' "$turn_secret" > data/turn-secrets/turn-rest-shared-secret
printf '%s\n' '[{"urls":["turn:coturn:3478"]}]' > data/turn-secrets/turn-backend-ice-servers.json
printf '%s\n' '[{"urls":["turn:127.0.0.1:3478"]}]' > data/turn-secrets/turn-frontend-ice-servers.json
printf '%s\n' "$turn_secret" > data/turn-secrets/coturn-auth-secret
printf '%s\n' "$(openssl rand -hex 32)" > data/turn-secrets/gateway-internal-token
agent_token="$(openssl rand -hex 32)"
printf '%s\n' "$agent_token" > data/turn-secrets/host-agent-token
printf '{"host":"%s"}\n' "$agent_token" > data/turn-secrets/connectivity-agent-tokens.json
chmod 600 data/turn-secrets/*
chmod 600 data/turn-config/turn-reachability-profile.json

Manager starts each Browser connectivity probe with the owner UID/GID of these bind-mounted files. The profile, TURN REST Secret, and backend ICE server file must therefore have the same owner; an owner mismatch fails Browser generation closed. The backend ICE server file uses the Compose-network Coturn address, while the frontend ICE server file uses an address reachable by the browser. The Compose service continues to run with only the minimum capabilities.

The workspace-operator image must contain the connectivity-evidence-gateway, connectivity-external-agent, and browser-connectivity-probe binary modes. Compose does not hide a build or pull an alternate image during startup. The default macOS and Linux host vantage uses host networking, and the frontend TURN URL must be reachable from both the local browser and host agent.

Volume Mounts​

Persistent Data​

Host pathContainer pathDescription
./data/postgres/var/lib/postgresql/dataPostgreSQL data
./data/redis/dataRedis persistent data
./data/workspace-data/host/workspace-dataWorkspace project files managed by Manager; dynamic containers mount the corresponding subdirectory
./data/workspace-scripts/host/workspace-scriptsWorkspace scripts managed by Manager
./data/runtime-home/<workspace-id>/home/developer in the dynamic RuntimeComplete user HOME, preserving agent logins, settings, XDG state, Maven state, and user-installed tools

Built-in platform CLIs are not installed in persistent HOME. uv, Node.js, npm, pnpm, and Claude Code are on system paths; Codex and Playwright CLI are under /opt/aileron/npm; OpenCode is under /opt/aileron/bin. Clearing HOME therefore removes user state but not tools built into the image.

Development Mounts​

These mounts are the core of local development mode. Compose mounts control-plane services; Manager mounts Runtime source and Terminal when it creates a dynamic Runtime.

Host pathContainer pathPurpose
./workspace-manager/workspace-managerManager code hot reload
./workspace-runtime/workspace-runtime in a dynamic RuntimeRuntime source mounted by Manager
./workspace-terminal/workspace-terminal in a dynamic RuntimeTerminal source mounted by Manager
./frontend/appFrontend code hot reload
/var/run/docker.sock/var/run/docker.sockDocker socket for container management

Development and Production Images​

Aileron Bake targets and tags have explicit meanings:

TypeExample tagCode sourceDeployment
Local developmentdev, dev-lite, dev-javaHost code mounted through volumesDocker Compose development mode
Production${RELEASE_TAG}Code packaged into the imageProduction Docker image
Kubernetes${RELEASE_TAG}-kubernetesPackaged code using a non-root targetKubernetes, Helm, and RKE2

Local tags do not include the CPU architecture. Bake creates an executable image for the build platform. CI or the RKE2 release flow explicitly selects the platform for cross-platform publishing.

Docker socket mount

workspace-manager and every Runtime created by the Docker provisioner mount /var/run/docker.sock; the Runtime mount is not selected per tool. This grants the container high-privilege control over the host Docker daemon and is suitable only for a trusted local development environment. Kubernetes Runtimes do not mount the host Docker socket. Use Kubernetes mode in production.

Network Configuration​

All services use the same aileron-network-dev bridge network.

Services reach one another by container name through Docker Compose's built-in DNS, for example:

  • postgres:5432
  • redis:6379
  • workspace-manager:3001
  • workspace-runtime-<workspace-id>:3002

Docker Compose does not install an IdP. Configure OIDC_ISSUER_URL for the installation-owned external provider. Discovery is always {issuer}/.well-known/openid-configuration, and the document's issuer must match exactly. PLATFORM_PUBLIC_ORIGIN is the sole browser entry point; callback, logout, and CORS derive from it.

Resource Requirements​

ServiceCPUMemoryDescription
workspace-browser2-core limit2 GB limit / 1 GB reservationneko WebRTC is the most resource-intensive component
workspace-browser—2 GB SHMShared memory required by Chrome
Other servicesUnlimitedUnlimitedAllocated dynamically according to actual use
Recommended configuration

For single-host evaluation and basic flow validation, use at least 4 vCPU / 8 GB RAM / 30 GB of free disk. For more stable browser and automation workflows with an OIDC adapter and multiple concurrent services, use 6–8 vCPU / 12–16 GB RAM / 50 GB of free disk. If the same host also runs Harbor, another Registry, large containers, or additional development services, start with at least 16 GB RAM to avoid swap or disk exhaustion.

Common Commands​

Build all local images:

docker buildx bake --load local

Start with existing images, or stop non-destructively while preserving data:

docker compose -f docker-compose.yml -f docker-compose.bundled-data-services.yml \
up --remove-orphans --no-build -d
make down

Run container tests and retain the same images as the final local artifacts:

make verify-local

Follow logs:

docker compose -f docker-compose.yml -f docker-compose.bundled-data-services.yml logs -f
docker compose -f docker-compose.yml -f docker-compose.bundled-data-services.yml logs -f workspace-manager
docker logs -f workspace-runtime-<workspace-id>

Run the project's only destructive host-side full reset:

make full-reset

docker compose manages only control-plane services. Starting, stopping, restarting, or deleting an individual Workspace must go through the Manager UI or API; do not operate its dynamic containers directly. ops.py up --build remains available as a convenience wrapper, but internally it only calls Bake followed by Compose and owns no version or architecture decisions. make down is a non-destructive stop that preserves volumes, PostgreSQL, and Workspace persistent data.

Startup includes Compose --remove-orphans, which removes containers no longer present in the configuration for the same Compose project. Docker Compose only handles orphans with the same project label; dynamically created Workspace containers and other test projects are outside this scope.

Full Reset​

full-reset is the only destructive local-environment reset available from the host. Permanent deletion of an individual Workspace must use the Manager UI or API and must not be replaced by host-side container cleanup.

make full-reset

This flow:

  1. Deletes all dynamic Workspace containers.
  2. Stops all Docker Compose services.
  3. Deletes Docker volumes whose names match the aileron filter.
  4. Deletes Docker networks whose names match the aileron filter.
  5. Asks whether to delete project Docker images.
  6. Clears container-generated files under data/, including PostgreSQL, Redis, optional adapter, and Workspace data.
  7. Clears listed project and /tmp directories.
  8. Asks whether to run docker system prune -f --volumes.

full-reset completes only after confirming that all dynamic Workspace containers and local persistent data under data/, including PostgreSQL, Redis, Workspace data, and Runtime homes, have been removed. Any required cleanup failure must produce a non-zero exit status.

The direct resource discovery in the first seven steps is limited to Aileron Workspace containers, volumes and networks whose names match aileron, project images, and the listed data directories. Step 8 is a global Docker prune. When confirmed, Docker additionally removes global containers, networks, images, build cache, and volumes that it considers unused, including unused resources from other projects.

danger

full-reset deletes Aileron database data, including users, Workspace settings, and templates. Confirming the global prune may also delete unused Docker resources from other projects. Back up data and read every interactive prompt before continuing.

Restart after the full reset:

docker buildx bake --load local
docker compose -f docker-compose.yml -f docker-compose.bundled-data-services.yml \
up --remove-orphans --no-build -d

Health Checks​

The control-plane services in the root Compose stack define health checks:

ServiceCheckIntervalInitial delay
postgrespg_isready10s—
redisredis-cli ping10s—
development-only OIDC fixture (when enabled)TCP port 808030s60s
workspace-managerHTTP /health30s—
frontendHTTP /30s—

Manager lifecycle reconciliation owns dynamic execution-plane health and each component revision. Query Runtime health through /workspaces/{workspaceId}/runtime/health on the same Origin, not through a separate hostname or localhost port.

Docker and Kubernetes Responsibilities​

AreaDocker modeKubernetes mode
Service managementdocker composeHelm + Operator
Workspace lifecycleDocker containerPod + internal Service; public traffic uses Frontend's gateway
Network isolationDocker bridge networkCilium Network Policy
StorageHost volume mountPVC (Persistent Volume Claim)
AuthenticationRequired (external OIDC or bundled Keycloak)Required (external OIDC or the independent bundled Keycloak Identity Plane)
Best suited forDevelopment, testing, demosProduction and multi-user collaboration

For Kubernetes deployment, see Kubernetes Mode.