Package: compose/. Docker Compose file 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.
The following services are always included:
| Service | Container name | Port |
|---|---|---|
gated | arizuko_gated_<flavor> | 8080 (API) |
timed | arizuko_timed_<flavor> | โ |
dashd | arizuko_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.
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.
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:
image: Docker imageentrypoint: command and args arrayenvironment: key/value pairs; empty string values are expanded from .envvolumes: array of {source, target, read_only}; ${DATA_DIR} expands to the instance data directory${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.
| Command | Action |
|---|---|
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).