dependency sd_notify for systemd service added

This commit is contained in:
Denis Knauf 2023-10-13 23:45:30 +02:00
parent 029f011f40
commit 9b1ee7a282
2 changed files with 9 additions and 2 deletions

View file

@ -1,5 +1,6 @@
source 'https://rubygems.org'
gem 'ruby-lxc', git: 'https://git.denkn.at/deac/ruby-lxc'
gem 'prometheus-client'
gem 'puma'
gem 'rack'
gem 'puma'
gem 'sd_notify'

View file

@ -1,11 +1,17 @@
[Unit]
Description=Prometheus lxc-exporter for getting container health
Documentation=https://git.denkn.at/deac/lxc-exporter
After=network-online.target
[Service]
Type=notify
KillMode=mixed
WatchdogSec=10
Restart=always
User=prometheus
WorkingDirectory=<%= Dir.pwd %>
ExecStart=<%= `which bundle`.chomp %> exec puma -b tcp://localhost:9124
ExecStart=<%= `which bundle`.chomp %> exec puma -b tcp://[::]:9124 -e production --tag lxc-exporter
ExecReload=/bin/kill -USR1 $MAINPID
[Install]
WantedBy=multi-user.target