smartbotic-runner.service 998 B

123456789101112131415161718192021222324252627282930313233
  1. [Unit]
  2. Description=SmartBotic Runner Service
  3. Documentation=https://github.com/smartbotic/smartbotic
  4. After=network.target smartbotic-webserver.service
  5. Requires=smartbotic-webserver.service
  6. # Without PartOf, "systemctl restart smartbotic.target" starts nothing and
  7. # stops nothing: a target is only a grouping, and restart/stop do not reach
  8. # its members through Wants alone. That silently leaves an old binary running
  9. # after a rebuild, with systemctl still reporting the target as active.
  10. PartOf=smartbotic.target
  11. [Service]
  12. Type=simple
  13. WorkingDirectory=/data/smartbotic
  14. # Add delay to ensure webserver is fully started before runner tries to register
  15. ExecStartPre=/bin/sleep 3
  16. ExecStart=/data/smartbotic/build/smartbotic-runner
  17. Restart=on-failure
  18. RestartSec=5
  19. StandardOutput=journal
  20. StandardError=journal
  21. # Environment
  22. Environment=LOG_LEVEL=info
  23. Environment=RUNNER_ID=runner-1
  24. Environment=NODES_PATH=/data/smartbotic/nodes
  25. # Resource limits
  26. LimitNOFILE=65536
  27. [Install]
  28. WantedBy=default.target