-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathadf-orchestrator.service
More file actions
49 lines (40 loc) · 1.42 KB
/
adf-orchestrator.service
File metadata and controls
49 lines (40 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
[Unit]
Description=AI Dark Factory Orchestrator
Documentation=https://git.terraphim.cloud/terraphim/terraphim-ai
After=network-online.target docker.service
Wants=network-online.target
[Service]
Type=simple
User=alex
Group=alex
WorkingDirectory=/opt/ai-dark-factory
# Source login profile for PATH, GITEA_TOKEN, GITEA_URL, then exec ADF.
# The login shell ensures ~/.cargo/bin, ~/.local/bin, ~/bin, ~/.bun/bin
# are all on PATH -- needed by child agents (opencode, gtr, cargo, etc.).
ExecStart=/bin/bash -lc 'exec /usr/local/bin/adf orchestrator.toml'
# Enable rate-limit backoff to prevent burning API budget on
# throttled providers (issue #1412).
Environment="RATE_LIMIT_BACKOFF_ENABLED=true"
# ADF manages its own child processes; give them time to finish on stop.
# SIGTERM lets ADF drain gracefully, SIGKILL after 90s if stuck.
TimeoutStopSec=90
KillMode=mixed
KillSignal=SIGTERM
# Restart on failure with back-off.
Restart=on-failure
RestartSec=30
# Logging to journald.
StandardOutput=journal
StandardError=journal
SyslogIdentifier=adf
# Resource guards -- ADF spawns many child agents so be generous.
# Limit total tree to 16GB RAM and 400% CPU (4 cores).
MemoryMax=16G
CPUQuota=400%
# Mild hardening -- ADF needs full HOME access for repos, worktrees,
# agent toolchains, and .profile env vars.
NoNewPrivileges=true
ProtectSystem=strict
ReadWritePaths=/opt/ai-dark-factory /home/alex /tmp /var/log
[Install]
WantedBy=multi-user.target