-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathautomaker-host.service
More file actions
76 lines (66 loc) · 2.54 KB
/
Copy pathautomaker-host.service
File metadata and controls
76 lines (66 loc) · 2.54 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# systemd unit — Automaker host-process deployment (no Docker).
#
# Runs the server + UI directly on the host so agents can reach native CLIs
# (gh, codex, opencode, infisical, claude). Counterpart to automaker-docker.service.
#
# Pick exactly one to enable per host:
# sudo systemctl enable --now automaker-host.service # bare-metal
# sudo systemctl enable --now automaker-docker.service # containerized
#
# Install:
# sudo cp automaker-host.service /etc/systemd/system/
# sudo systemctl daemon-reload
# sudo systemctl enable --now automaker-host.service
#
# Override per host by dropping a file at
# /etc/systemd/system/automaker-host.service.d/override.conf, e.g. to point at
# a different deploy user, repo path, or node version. Logs go to journald:
# `journalctl -u automaker-host -f`.
[Unit]
Description=Automaker AI Development Studio (host process)
Documentation=https://github.com/protoLabsAI/protoMaker
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=automaker
Group=automaker
WorkingDirectory=/opt/protomaker
# `npm start` runs start-automaker.mjs --production, which builds packages +
# server, then launches the prod-mode server (and UI when configured).
# Use absolute paths so systemd doesn't depend on PATH being inherited.
Environment=NODE_ENV=production
Environment=AUTO_MODE=true
Environment=HOST=0.0.0.0
Environment=PORT=3008
Environment=DATA_DIR=/opt/protomaker/data
# HOME needs to be writable for npm cache + tool credentials (codex, gh, etc).
Environment=HOME=/home/automaker
ExecStart=/usr/bin/npm start
# Graceful stop: send SIGTERM, allow up to 30s for in-flight agents to finish,
# then SIGKILL. The server's shutdown handler aborts running features and
# marks them interrupted in feature.json so they resume on next start.
KillMode=mixed
KillSignal=SIGTERM
TimeoutStopSec=30
# Restart policy: bounce on crash, give it 10s breathing room.
Restart=on-failure
RestartSec=10
StartLimitIntervalSec=300
StartLimitBurst=5
# Logging to journald — pair with stdout/stderr capture from the node process.
StandardOutput=journal
StandardError=journal
SyslogIdentifier=automaker-host
# Resource limits — generous defaults for concurrent agents. Tighten per host.
LimitNOFILE=65536
TasksMax=8192
# Filesystem hardening — keep the deploy user contained without breaking
# legitimate work. The agent needs to write worktrees under the repo path.
ProtectSystem=full
ProtectHome=read-only
ReadWritePaths=/opt/protomaker /home/automaker /tmp
NoNewPrivileges=true
PrivateTmp=false
[Install]
WantedBy=multi-user.target