Skip to content

Instantly share code, notes, and snippets.

@kwoktung
Last active November 28, 2019 14:45
Show Gist options
  • Save kwoktung/3c4141615c0ccc561b942abd6a5da2ab to your computer and use it in GitHub Desktop.
Save kwoktung/3c4141615c0ccc561b942abd6a5da2ab to your computer and use it in GitHub Desktop.
[Unit]
Description=MinIO
Documentation=https://docs.min.io
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=/usr/local/bin/minio
[Service]
WorkingDirectory=/usr/local/
User=minio
Group=minio
EnvironmentFile=/etc/minio/minio.conf
ExecStartPre=/bin/bash -c "if [ -z \"${MINIO_VOLUMES}\" ]; then echo \"Variable MINIO_VOLUMES not set in /etc/default/minio\"; exit 1; fi"
ExecStart=/usr/local/bin/minio server $MINIO_OPTS $MINIO_VOLUMES
# Let systemd restart this service always
Restart=always
# Specifies the maximum file descriptor number that can be opened by this process
LimitNOFILE=65536
# Disable timeout logic and wait until process is stopped
TimeoutStopSec=infinity
SendSIGKILL=no
[Install]
WantedBy=multi-user.target
# Built for ${project.name}-${project.version} (${project.name})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment