Files
ignition/local_exporter.container
Dustin C. Hatch 910c7c56c9 local_exporter: Start after network online
The *local_exporter.service* cannot start on first boot without the
network, as it needs to pull the container image from.
2024-01-06 19:49:41 -06:00

25 lines
529 B
Plaintext

[Unit]
Description=Bridge for local Prometheus metrics
After=network-online.target
Wants=network-online.target
[Container]
Image=git.pyrocufflink.net/containerimages/local_exporter:latest
Exec=serve
Volume=/run:/run:rw
Volume=/etc/local_exporter:/etc/local_exporter:ro
PublishPort=9598:9598
# Must run as user "zincati"
User=981
ReadOnly=yes
VolatileTmp=yes
# container_t does not have permission to write to var_run_t
SecurityLabelDisable=yes
NoNewPrivileges=yes
[Service]
Restart=always
[Install]
WantedBy=multi-user.target