name: aidon x-service-base: &service-base build: context: . dockerfile: docker/Dockerfile restart: unless-stopped # Match the owner of the bind-mounted aidon-data directory. user: "${AIDON_UID:-1000}:${AIDON_GID:-1000}" network_mode: host read_only: true tmpfs: - /tmp:rw,noexec,nosuid,size=256m cap_drop: - ALL security_opt: - no-new-privileges:true services: aidon: <<: *service-base environment: AIDON_HOME: /data command: ["webui", "serve", "--port", "${AIDON_WEBUI_PORT:-8765}"] volumes: - ./aidon-data:/data # Listener liveness only; model and sandbox readiness need separate probes. healthcheck: test: ["CMD", "python", "-c", "import socket; socket.create_connection(('127.0.0.1', ${AIDON_WEBUI_PORT:-8765}), timeout=3).close()"] interval: 30s timeout: 5s start_period: 30s retries: 3 # Tailscale Funnel targets this webhook-only listener; the full WebUI stays private. aidon-webhooks: <<: *service-base environment: AIDON_HOME: /data command: ["webui", "serve", "--webhook-only", "--port", "8766"] volumes: - ./aidon-data:/data healthcheck: test: ["CMD", "python", "-c", "import socket; socket.create_connection(('127.0.0.1', 8766), timeout=3).close()"] interval: 30s timeout: 5s start_period: 30s retries: 3 # Clean-home profile: run isolated data with `docker compose --profile clean up -d aidon-clean aidon-webhooks-clean`. aidon-clean: <<: *service-base profiles: [clean] environment: AIDON_HOME: /data command: ["webui", "serve", "--port", "${AIDON_WEBUI_PORT:-8765}"] volumes: - ./aidon-clean-data:/data healthcheck: test: ["CMD", "python", "-c", "import socket; socket.create_connection(('127.0.0.1', ${AIDON_WEBUI_PORT:-8765}), timeout=3).close()"] interval: 30s timeout: 5s start_period: 30s retries: 3 aidon-webhooks-clean: <<: *service-base profiles: [clean] environment: AIDON_HOME: /data command: ["webui", "serve", "--webhook-only", "--port", "8766"] volumes: - ./aidon-clean-data:/data healthcheck: test: ["CMD", "python", "-c", "import socket; socket.create_connection(('127.0.0.1', 8766), timeout=3).close()"] interval: 30s timeout: 5s start_period: 30s retries: 3 # Development profile: run with `docker compose --profile dev up -d aidon-dev aidon-webhooks-dev`. aidon-dev: <<: *service-base profiles: [dev] environment: AIDON_HOME: /data PYTHONPATH: /opt/aidon command: ["webui", "serve", "--port", "${AIDON_WEBUI_PORT:-8765}"] volumes: - ./aidon-data:/data - ./src:/opt/aidon/src:ro healthcheck: test: ["CMD", "python", "-c", "import socket; socket.create_connection(('127.0.0.1', ${AIDON_WEBUI_PORT:-8765}), timeout=3).close()"] interval: 30s timeout: 5s start_period: 30s retries: 3 aidon-webhooks-dev: <<: *service-base profiles: [dev] environment: AIDON_HOME: /data PYTHONPATH: /opt/aidon command: ["webui", "serve", "--webhook-only", "--port", "8766"] volumes: - ./aidon-data:/data - ./src:/opt/aidon/src:ro healthcheck: test: ["CMD", "python", "-c", "import socket; socket.create_connection(('127.0.0.1', 8766), timeout=3).close()"] interval: 30s timeout: 5s start_period: 30s retries: 3 # Desktop profile: the script starts this UI plus the regular webhook listener. aidon-desktop: <<: *service-base profiles: [desktop] environment: AIDON_HOME: /data DISPLAY: "${DISPLAY:-}" XAUTHORITY: /run/aidon-xauthority AIDON_COMPUTER_DRIVER: x11 AIDON_KERNEL: "0" command: ["webui", "serve", "--port", "${AIDON_WEBUI_PORT:-8765}"] volumes: - ./aidon-data:/data - /tmp/.X11-unix:/tmp/.X11-unix:ro - "${AIDON_DESKTOP_XAUTHORITY:-/dev/null}:/run/aidon-xauthority:ro" healthcheck: test: ["CMD", "python", "-c", "import socket; socket.create_connection(('127.0.0.1', ${AIDON_WEBUI_PORT:-8765}), timeout=3).close()"] interval: 30s timeout: 5s start_period: 30s retries: 3