r/minio: Start more reliably on boot

The MinIO service often fails to start from a cold boot.  Delaying
starting the service until the network is online, plus increasing the
startup timeout, should help with this.  If not, enabling auto restart
will let systemd try to start the service again if it still fails to
come up on time.
frigate-exporter
Dustin 2024-01-21 15:51:44 -06:00
parent 423951bac1
commit 823d899e9e
1 changed files with 4 additions and 2 deletions

View File

@ -1,7 +1,7 @@
[Unit] [Unit]
Description=MinIO Object Storage Description=MinIO Object Storage
Wants=network.target Wants=network-online.target
After=network.target After=network-online.target
[Container] [Container]
Image={{ minio_container_image }}:{{ minio_version }} Image={{ minio_container_image }}:{{ minio_version }}
@ -16,6 +16,8 @@ NoNewPrivileges=yes
[Service] [Service]
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
TimeoutStartSec=5min
Restart=always
MemoryDenyWriteExecute=yes MemoryDenyWriteExecute=yes
PrivateTmp=yes PrivateTmp=yes
ProtectClock=yes ProtectClock=yes