diff --git a/docker-compose.yml b/docker-compose.yml index aeec67d..dd9dcca 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -56,6 +56,31 @@ services: env_file: - .env + edge: + build: + context: docker/edge + dockerfile: Dockerfile + image: disinto/edge:latest + container_name: disinto-edge + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - /usr/local/bin/claude:/usr/local/bin/claude:ro + - ${HOME}/.claude.json:/root/.claude.json:ro + - ${HOME}/.claude:/root/.claude:ro + - disinto-logs:/opt/disinto-logs + environment: + - FORGE_SUPERVISOR_TOKEN=${FORGE_SUPERVISOR_TOKEN:-} + - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-} + - CLAUDE_MODEL=claude-sonnet-4-6 + - FORGE_TOKEN=${FORGE_TOKEN:-} + - FORGE_URL=http://forgejo:3000 + - DISINTO_CONTAINER=1 + ports: + - "80:80" + - "443:443" + depends_on: + - forgejo + forgejo: image: codeberg.org/forgejo/forgejo:1 container_name: disinto-forgejo @@ -69,3 +94,6 @@ services: - FORGEJO__service__REQUIRE_SIGNIN_VIEW=true ports: - "3000:3000" + +volumes: + disinto-logs: diff --git a/docker/edge/entrypoint-edge.sh b/docker/edge/entrypoint-edge.sh index 6f96bc5..26ae442 100755 --- a/docker/edge/entrypoint-edge.sh +++ b/docker/edge/entrypoint-edge.sh @@ -15,5 +15,11 @@ fi # Start dispatcher in background bash /opt/disinto/docker/edge/dispatcher.sh & +# Start supervisor loop in background +while true; do + bash /opt/disinto/supervisor/supervisor-run.sh /opt/disinto/projects/disinto.toml 2>&1 | tee -a /opt/disinto-logs/supervisor.log || true + sleep 1200 # 20 minutes +done & + # Caddy as main process exec caddy run --config /etc/caddy/Caddyfile --adapter caddyfile diff --git a/state/.gitignore b/state/.gitignore index 0a0c1e8..eb205a2 100644 --- a/state/.gitignore +++ b/state/.gitignore @@ -1,2 +1,4 @@ # Active-state files are runtime state, not committed .*-active +# Supervisor is always active in the edge container — committed guard file +!.supervisor-active diff --git a/state/.supervisor-active b/state/.supervisor-active new file mode 100644 index 0000000..e69de29