A self-hosted orchestration system crafted for power users. composia.xyz
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139# =============================================================================# Controller stack — keep these on your controller node# =============================================================================services: init-repo-controller: image: alpine/git:v2.54.0 working_dir: /data/repo-controller entrypoint: - sh - -ec - | git config --global --add safe.directory /data/repo-controller if [ ! -d .git ]; then git init; fi if ! git rev-parse --verify HEAD >/dev/null 2>&1; then git config user.name "Composia" git config user.email "composia@example.com" git commit --allow-empty -m "Initialize Composia repository" fi volumes: - ${COMPOSIA_CONTROLLER_REPO_DIR}:/data/repo-controller
init-perms-controller: image: alpine:3.24 depends_on: init-repo-controller: condition: service_completed_successfully entrypoint: - sh - -ec - | mkdir -p /data/repo-controller /data/state-controller /data/logs/tasks chown -R 65532:65532 /data/repo-controller /data/state-controller /data/logs volumes: - ${COMPOSIA_CONTROLLER_REPO_DIR}:/data/repo-controller - ${COMPOSIA_CONTROLLER_STATE_DIR}:/data/state-controller - ${COMPOSIA_CONTROLLER_LOG_DIR}:/data/logs
controller: image: forgejo.alexma.top/alexma233/composia-controller:latest depends_on: init-repo-controller: condition: service_completed_successfully init-perms-controller: condition: service_completed_successfully init-config-perms: condition: service_completed_successfully command: ["-config", "/app/configs/config.yaml"] ports: - "7001:7001" volumes: # The controller may atomically update the opt-in editable config projection. - ${COMPOSIA_CONFIG_DIR}:/app/configs - ${COMPOSIA_CONTROLLER_REPO_DIR}:/data/repo-controller - ${COMPOSIA_CONTROLLER_STATE_DIR}:/data/state-controller - ${COMPOSIA_CONTROLLER_LOG_DIR}:/data/logs networks: - composia restart: unless-stopped
# =============================================================================# Web UI — keep on controller node# =============================================================================
web: image: forgejo.alexma.top/alexma233/composia-web:latest depends_on: controller: condition: service_started env_file: - ./.env ports: - "3000:3000" networks: - composia restart: unless-stopped
# =============================================================================# Shared init — needed on both controller and agent nodes# =============================================================================
init-config-perms: image: alpine:3.24 entrypoint: - sh - -ec - | mkdir -p /app/configs chown -R 65532:65532 /app/configs chmod -R u+rwX /app/configs if [ -f /app/configs/age-identity.key ]; then chmod 600 /app/configs/age-identity.key fi if [ -f /app/configs/age-recipients.txt ]; then chmod 644 /app/configs/age-recipients.txt fi volumes: - ${COMPOSIA_CONFIG_DIR}:/app/configs
# =============================================================================# Agent stack — keep these on each agent node# =============================================================================
init-perms-agent: image: alpine:3.24 entrypoint: - sh - -ec - | mkdir -p /data/state-agent chown -R 65532:65532 ${COMPOSIA_AGENT_REPO_DIR} /data/state-agent volumes: - ${COMPOSIA_AGENT_REPO_DIR}:${COMPOSIA_AGENT_REPO_DIR} - ${COMPOSIA_AGENT_STATE_DIR}:/data/state-agent
agent: image: forgejo.alexma.top/alexma233/composia-agent:latest depends_on: controller: condition: service_started init-perms-agent: condition: service_completed_successfully init-config-perms: condition: service_completed_successfully command: ["-config", "/app/configs/config.yaml"] group_add: - "${DOCKER_SOCK_GID}" volumes: - ${COMPOSIA_CONFIG_DIR}:/app/configs:ro - /var/run/docker.sock:/var/run/docker.sock - ${COMPOSIA_AGENT_REPO_DIR}:${COMPOSIA_AGENT_REPO_DIR} - ${COMPOSIA_AGENT_STATE_DIR}:/data/state-agent networks: - composia restart: unless-stopped
networks: composia: name: composia