Merge pull request 'fix: feat: integrate supervisor into edge container (#344)' (#349) from fix/issue-344 into main
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
This commit is contained in:
commit
8a10d6e26c
4 changed files with 36 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
2
state/.gitignore
vendored
2
state/.gitignore
vendored
|
|
@ -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
|
||||
|
|
|
|||
0
state/.supervisor-active
Normal file
0
state/.supervisor-active
Normal file
Loading…
Add table
Add a link
Reference in a new issue