fable-agent/deploy/fable-agent.service

37 lines
797 B
Desktop File

[Unit]
Description=Fable Agent — Self-improving agent system daemon
Documentation=https://github.com/movez/fable-agent
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=fable
Group=fable
WorkingDirectory=/opt/fable-agent
# Environment
Environment=NODE_ENV=production
Environment=FABLE_DATA_DIR=/var/lib/fable-agent
EnvironmentFile=/etc/fable-agent.env
# Exec
ExecStart=/usr/bin/node /opt/fable-agent/dist/index.js daemon start
ExecStop=/usr/bin/node /opt/fable-agent/dist/index.js daemon stop
Restart=always
RestartSec=30
# Security
NoNewPrivileges=true
ProtectSystem=full
ProtectHome=true
PrivateTmp=true
ReadWritePaths=/var/lib/fable-agent /opt/fable-agent/LOGS
# Logging
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target