Files
configpolicy/roles/minio/templates/minio.container.j2
Dustin C. Hatch 823d899e9e 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.
2024-01-21 15:53:33 -06:00

38 lines
815 B
Django/Jinja

[Unit]
Description=MinIO Object Storage
Wants=network-online.target
After=network-online.target
[Container]
Image={{ minio_container_image }}:{{ minio_version }}
Exec=server /data --certs-dir /certs
User=224
Group=224
EnvironmentFile=/etc/sysconfig/minio
Volume={{ minio_storage_path }}:/data:rw,Z
Volume=/etc/minio/certs:/certs:ro,z
Network=host
NoNewPrivileges=yes
[Service]
ExecReload=/bin/kill -HUP $MAINPID
TimeoutStartSec=5min
Restart=always
MemoryDenyWriteExecute=yes
PrivateTmp=yes
ProtectClock=yes
ProtectHome=yes
ProtectKernelLogs=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectProc=invisible
ProtectSystem=strict
ReadWritePaths=/var/lib/containers/storage
ReadWritePaths={{ minio_storage_path }}
RestrictRealtime=yes
RestrictSUIDSGID=yes
UMask=0077
[Install]
WantedBy=multi-user.target