Compose

Package: compose/. Docker Compose file generation.

Generation

compose.Generate(dataDir) reads the instance .env and any services/*.toml files, then writes a docker-compose.yml to the data directory. It does not start anything.

arizuko run <instance> calls generate then docker compose up -d. arizuko generate <instance> only writes the file.

Built-in services

The following services are always included:

ServiceContainer namePort
gatedarizuko_gated_<flavor>8080 (API)
timedarizuko_timed_<flavor>โ€”
dashdarizuko_dashd_<flavor>8090

onbod is auto-included when ONBOARDING_ENABLED=true in the .env. Its listen address is set to :8092 to avoid conflict with dashd.

Container naming convention

compose.Generate derives the project name from the data directory basename. For /srv/data/arizuko_krons/: app = arizuko, flavor = krons. All containers follow the pattern <app>_<daemon>_<flavor>:

arizuko_gated_krons
arizuko_timed_krons
arizuko_dashd_krons
arizuko_teled_krons     # from services/teled.toml
arizuko_discd_krons     # from services/discd.toml

This convention prevents name collisions when multiple arizuko instances run on the same Docker host.

Service TOML format

Each file under services/ defines one additional service. Filename without extension becomes the service name.

# services/teled.toml
image = "arizuko:latest"
entrypoint = ["/usr/local/bin/teled"]

[environment]
TELEGRAM_BOT_TOKEN = ""   # expanded from .env at generate time
API_URL = "http://arizuko_gated_krons:8080"
CHANNEL_SECRET = ""

[[volumes]]
source = "${DATA_DIR}/store"
target = "/data/store"

Fields:

DATA_DIR expansion

${DATA_DIR} in volume source paths is expanded to the absolute path of the instance data directory at generation time. This is the same path used for HOST_DATA_DIR when the gateway runs inside Docker.

arizuko generate vs arizuko run

CommandAction
arizuko generate <instance>Write docker-compose.yml to data dir. No Docker calls.
arizuko run <instance>Call generate, then docker compose up -d

The systemd unit typically calls arizuko run (or uses docker run arizuko:latest arizuko generate <name> then docker compose up for full Docker-in-Docker deployment).