Menu
AkurAI-Build
publicLatest change d0c2339c9de3aeb121c1fbca7e47856e87ec6d3d - Fix git HTTP gzip uploads; sweep stale olafurbui paths by Ólafur Búi Ólafsson
# AkurAI Build production deployment: service + worker containers.
# Canonical copy lives in the repo (deploy/); installed at /opt/akurai-build.
#
# Host networking keeps the public bind on 0.0.0.0:3210 (nginx unchanged) and
# lets the worker reach loopback-only MariaDB instances for CI tests. Both
# containers run as uid 1000 against bind-mounted host state, so the host MCP
# process (`akurai mcp`, spawned by agents over stdio) keeps operating on the
# same database file.
#
# The worker is the ONLY execution surface and is hard-capped: native cargo
# builds inherit the container's 8g/8cpu ceiling instead of the host's 31g,
# which is the mitigation for the 2026-07-16 build-load freeze series.
name: akurai-build
x-common: &common
network_mode: host
restart: unless-stopped
user: "1000:1000"
env_file:
- /home/olibuijr/.config/akurai-build/env
environment: &common-env
HOME: /home/olibuijr
RUST_LOG: akurai_build=info,tower_http=info
services:
service:
<<: *common
image: akurai-build-service:${AKURAI_BUILD_VERSION:?AKURAI_BUILD_VERSION must be set}
container_name: akurai-build-service
mem_limit: 1g
memswap_limit: 1g
cpus: 2
environment:
<<: *common-env
AKURAI_WORKERS: "0"
command:
- --data
- /home/olibuijr/.local/share/akurai-build
- --key-file
- /home/olibuijr/.config/akurai-build/database.key
- serve
- --address
- 0.0.0.0:3210
- --token-file
- /home/olibuijr/.config/akurai-build/api.token
- --webhook-secret-file
- /home/olibuijr/.config/akurai-build/webhook.token
volumes:
- /home/olibuijr/.local/share/akurai-build:/home/olibuijr/.local/share/akurai-build
- /home/olibuijr/.config/akurai-build:/home/olibuijr/.config/akurai-build:ro
healthcheck:
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:3210/api/health"]
interval: 10s
timeout: 3s
retries: 12
start_period: 10s
worker:
<<: *common
image: akurai-build-worker:${AKURAI_BUILD_VERSION:?AKURAI_BUILD_VERSION must be set}
container_name: akurai-build-worker
mem_limit: 8g
memswap_limit: 8g
cpus: 8
group_add:
- "962" # host docker group: sibling container spawning via docker.sock
environment:
<<: *common-env
AKURAI_WORKERS: "1"
command:
- --data
- /home/olibuijr/.local/share/akurai-build
- --key-file
- /home/olibuijr/.config/akurai-build/database.key
- serve
- --address
- 127.0.0.1:3211
- --token-file
- /home/olibuijr/.config/akurai-build/api.token
- --webhook-secret-file
- /home/olibuijr/.config/akurai-build/webhook.token
volumes:
- /home/olibuijr/.local/share/akurai-build:/home/olibuijr/.local/share/akurai-build
- /home/olibuijr/.config/akurai-build:/home/olibuijr/.config/akurai-build:ro
- /home/olibuijr/.rustup:/home/olibuijr/.rustup
- /home/olibuijr/.cargo:/home/olibuijr/.cargo
# Deploy jobs install maintained host CLIs atomically; the worker must share that writable path.
- /home/olibuijr/.local/bin:/home/olibuijr/.local/bin
- /home/olibuijr/.local/libexec:/home/olibuijr/.local/libexec:ro
- /home/olibuijr/.ssh:/home/olibuijr/.ssh:ro
- /home/olibuijr/Projects/akurai-log:/home/olibuijr/Projects/akurai-log
- /home/olibuijr/Projects/AkurAI-Mail:/home/olibuijr/Projects/AkurAI-Mail
- /var/run/docker.sock:/var/run/docker.sock
healthcheck:
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:3211/api/health"]
interval: 10s
timeout: 3s
retries: 12
start_period: 10s