mirror of
https://github.com/BastilleBSD/templates.git
synced 2025-12-10 17:00:30 +01:00
Add MinIO (#21)
This commit is contained in:
15
www/minio/Bastillefile
Normal file
15
www/minio/Bastillefile
Normal 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
7
www/minio/README.md
Normal 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
31
www/minio/minio.rc
Normal 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"
|
||||
Reference in New Issue
Block a user