version: "3.8" x-wizard-base: &wizard-base build: context: . dockerfile: docker/agent.Dockerfile restart: unless-stopped networks: - fleet healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8643/health"] interval: 30s timeout: 10s retries: 5 start_period: 15s services: ollama: image: ollama/ollama:latest container_name: ollama restart: unless-stopped ports: - "${OLLAMA_PORT:-11434}:11434" volumes: - ollama_data:/root/.ollama networks: - fleet healthcheck: test: ["CMD", "curl", "-f", "http://localhost:11434/api/tags"] interval: 30s timeout: 10s retries: 5 start_period: 60s deploy: resources: reservations: devices: - driver: nvidia count: all capabilities: [gpu] gitea: image: gitea/gitea:latest container_name: gitea restart: unless-stopped environment: - USER_UID=${GITEA_UID:-1000} - USER_GID=${GITEA_GID:-1000} - GITEA__server__ROOT_URL=${GITEA_ROOT_URL:-http://gitea:3000} - GITEA__server__DOMAIN=${GITEA_DOMAIN:-gitea} - GITEA__server__SSH_PORT=${GITEA_SSH_PORT:-2222} - GITEA__database__DB_TYPE=sqlite3 ports: - "${GITEA_WEB_PORT:-3000}:3000" - "${GITEA_SSH_PORT:-2222}:22" volumes: - gitea_data:/data - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro networks: - fleet healthcheck: test: ["CMD", "curl", "-f", "http://localhost:3000/api/v1/version"] interval: 30s timeout: 10s retries: 5 start_period: 30s ezra: <<: *wizard-base container_name: wizard-ezra ports: - "8643:8643" volumes: - /root/wizards/ezra/.hermes:/root/.hermes - /root/wizards/ezra/models:/app/models environment: - WIZARD_NAME=ezra depends_on: ollama: { condition: service_healthy } gitea: { condition: service_healthy } bezalel: <<: *wizard-base container_name: wizard-bezalel ports: - "8644:8643" volumes: - /root/wizards/bezalel/.hermes:/root/.hermes - /root/wizards/bezalel/models:/app/models environment: - WIZARD_NAME=bezalel depends_on: ollama: { condition: service_healthy } gitea: { condition: service_healthy } allegro: <<: *wizard-base container_name: wizard-allegro ports: - "8645:8643" volumes: - /root/wizards/allegro/.hermes:/root/.hermes - /root/wizards/allegro/models:/app/models environment: - WIZARD_NAME=allegro depends_on: ollama: { condition: service_healthy } gitea: { condition: service_healthy } monitor: image: curlimages/curl:latest container_name: monitor restart: unless-stopped entrypoint: /bin/sh command: - -c - | while true; do echo "[monitor] Checking services..." for svc in ollama:11434/api/tags gitea:3000/api/v1/version ezra:8643/health bezalel:8643/health allegro:8643/health; do host=$(echo \"$\" | cut -d: -f1) url=\"http://$\" if curl -sf \"$\" > /dev/null 2>&1; then echo \"[monitor] $: OK\" else echo \"[monitor] $: DOWN\" fi done sleep ${MONITOR_INTERVAL:-60} done networks: - fleet depends_on: - ollama - gitea volumes: ollama_data: driver: local gitea_data: driver: local networks: fleet: driver: bridge name: fleet-net