central/systemd/central-archive.service
Matt Johnson c6cbdb0825 docs: add systemd unit files with EnvironmentFile directive
Unit files load env vars from /etc/central/central.env using
EnvironmentFile directive. Includes README with installation
and configuration instructions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-16 02:38:21 +00:00

27 lines
668 B
Desktop File

[Unit]
Description=Central archive consumer (JetStream -> TimescaleDB)
After=network-online.target nats-server.service postgresql@16-main.service
Wants=network-online.target
Requires=nats-server.service postgresql@16-main.service
[Service]
Type=simple
User=central
Group=central
WorkingDirectory=/opt/central
Environment=HOME=/opt/central
EnvironmentFile=/etc/central/central.env
ExecStart=/opt/central/.venv/bin/central-archive
Restart=on-failure
RestartSec=5
LimitNOFILE=65536
NoNewPrivileges=true
ProtectSystem=full
ProtectHome=true
PrivateTmp=true
ReadWritePaths=/var/lib/central
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target