76 lines
2 KiB
Desktop File
76 lines
2 KiB
Desktop File
# =============================================================================
|
|
# AUTO-COMMIT SERVICE: Systemd Unit File
|
|
# =============================================================================
|
|
#
|
|
# Automated commit message generation service using local LLM inference.
|
|
# Commits and pushes changes across lilith-platform repos every 15 minutes.
|
|
#
|
|
# Installation:
|
|
# 1. Install the auto-commit-service package
|
|
# 2. Copy to /etc/systemd/system/auto-commit.service
|
|
# 3. Create /opt/auto-commit/.env with required variables
|
|
# 4. systemctl daemon-reload
|
|
# 5. systemctl enable auto-commit.service
|
|
# 6. systemctl start auto-commit.service
|
|
#
|
|
# Management:
|
|
# - systemctl status auto-commit
|
|
# - systemctl restart auto-commit
|
|
# - journalctl -u auto-commit -f
|
|
#
|
|
# Manual trigger:
|
|
# - curl -X POST http://localhost:8200/trigger
|
|
#
|
|
# =============================================================================
|
|
|
|
[Unit]
|
|
Description=Auto-Commit Service - Automated Git Commit Message Generation
|
|
Documentation=https://github.com/lilith-platform/auto-commit-service
|
|
After=network-online.target llama-service.service
|
|
Wants=network-online.target
|
|
Requires=llama-service.service
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=lilith
|
|
Group=lilith
|
|
WorkingDirectory=/opt/auto-commit
|
|
|
|
# Environment
|
|
Environment=PYTHONUNBUFFERED=1
|
|
Environment=GPU_SERVICE_NAME=auto-commit
|
|
EnvironmentFile=/opt/auto-commit/.env
|
|
|
|
# Service execution
|
|
ExecStart=/opt/auto-commit/venv/bin/python -m auto_commit_service
|
|
|
|
# Process management
|
|
Restart=always
|
|
RestartSec=30
|
|
KillMode=mixed
|
|
KillSignal=SIGTERM
|
|
TimeoutStopSec=60
|
|
|
|
# Resource limits - lightweight service, minimal resources
|
|
LimitNOFILE=65535
|
|
MemoryMax=512M
|
|
CPUQuota=50%
|
|
|
|
# Security hardening
|
|
NoNewPrivileges=true
|
|
PrivateTmp=true
|
|
ProtectSystem=strict
|
|
ProtectHome=read-only
|
|
|
|
# Allow access to repos and log directory
|
|
ReadWritePaths=/var/home/lilith/Code/@applications/@lilith/lilith-platform
|
|
ReadWritePaths=/var/log/auto-commit
|
|
ReadOnlyPaths=/opt/auto-commit
|
|
|
|
# Logging
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
SyslogIdentifier=auto-commit
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|