feat: Phase 6 - Docker, systemd, and installation scripts

This commit is contained in:
2026-04-13 15:53:08 -04:00
parent 732555cf55
commit 748f05be46
9 changed files with 495 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
[Unit]
Description=Companion AI Vault Indexer
Documentation=https://github.com/santhoshjan/companion
After=network.target companion-api.service
Wants=companion-api.service
[Service]
Type=simple
User=companion
Group=companion
WorkingDirectory=/opt/companion
Environment=PYTHONPATH=/opt/companion
Environment=COMPANION_CONFIG=/opt/companion/config.json
Environment=COMPANION_DATA_DIR=/var/lib/companion
# Start the file watcher for auto-sync
ExecStart=/opt/companion/venv/bin/python -m companion.indexer_daemon.watcher
# Or use the CLI for scheduled sync (uncomment to use):
# ExecStart=/opt/companion/venv/bin/python -m companion.indexer_daemon.cli sync
# Restart on failure
Restart=on-failure
RestartSec=10
# Resource limits
MemoryMax=1G
CPUQuota=100%
# Security hardening
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/var/lib/companion
[Install]
WantedBy=multi-user.target