Add MinIO (#21)

This commit is contained in:
Alessandro Iezzi
2025-11-09 20:53:21 +01:00
committed by GitHub
parent e285391c5d
commit 2dd3a0b4b6
3 changed files with 53 additions and 0 deletions

15
www/minio/Bastillefile Normal file
View File

@@ -0,0 +1,15 @@
CMD /bin/sh -c "echo '127.0.0.1 $(hostname)' >> /etc/hosts"
# Also creates a `minio` user
PKG minio
# Creates the upload directory as defined in the `minio.rc` file.
CMD mkdir /usr/local/share/minio
CMD chown -R minio:minio /usr/local/share/minio
CP minio.rc /usr/local/etc/rc.d/minio
CMD chmod 755 /usr/local/etc/rc.d/minio
SYSRC minio_enable=YES
SERVICE minio start

7
www/minio/README.md Normal file
View File

@@ -0,0 +1,7 @@
## MinIO
Bastille template to boostrap MinIO
## Usage
```shell
bastille template TARGET www/minio
```

31
www/minio/minio.rc Normal file
View File

@@ -0,0 +1,31 @@
#!/bin/sh
# PROVIDE: minio
# REQUIRE: NETWORKING
# KEYWORD: shutdown
. /etc/rc.subr
name="minio"
rcvar="minio_enable"
command="/usr/local/bin/minio"
pidfile="/var/run/${name}.pid"
minio_user="minio"
minio_group="minio"
minio_dir="/usr/local/share/minio"
minio_console=":9001"
minio_address=":9000"
start_cmd="${name}_start"
stop_cmd=":"
minio_start() {
echo "Starting MinIO..."
/usr/sbin/daemon -u ${minio_user} -p ${pidfile} \
${command} server ${minio_dir} \
--address ${minio_address} \
--console-address ${minio_console}
}
load_rc_config $name
run_rc_command "$1"