scripts/lech/docker/minio.sh

39 lines
1.1 KiB
Bash
Raw Normal View History

2023-09-05 11:40:31 -04:00
#!/bin/bash
set -e
2023-09-07 21:08:48 -04:00
CERTS=/mammoth/k8s-config/caddy/data/caddy/certificates/acme.zerossl.com-v2-dv90
2023-09-05 11:40:31 -04:00
up () {
2023-09-07 21:08:48 -04:00
echo -n "Enter MINIO_ROOT_PASSWORD: "
read MINIO_ROOT_PASSWORD
2023-09-05 11:40:31 -04:00
docker run \
--detach \
--name minio \
--restart unless-stopped \
2023-09-07 21:08:48 -04:00
--env MINIO_BROWSER_REDIRECT_URL=https://s3.console.bigcavemaps.com \
2023-09-05 11:40:31 -04:00
--env MINIO_ROOT_USER=admin \
2023-09-07 21:08:48 -04:00
--env MINIO_ROOT_PASSWORD=$MINIO_ROOT_PASSWORD \
--env MINIO_SERVER_URL=https://s3.bigcavemaps.com \
2023-09-05 11:40:31 -04:00
--volume /mammoth/minio:/data:rw \
2023-09-07 21:08:48 -04:00
--volume $CERTS/s3.bigcavemaps.com/s3.bigcavemaps.com.crt:/certs/public.crt:ro \
--volume $CERTS/s3.bigcavemaps.com/s3.bigcavemaps.com.key:/certs/private.key:ro \
--volume $CERTS/s3.console.bigcavemaps.com/s3.console.bigcavemaps.com.crt:/certs/console/public.crt:ro \
--volume $CERTS/s3.console.bigcavemaps.com/s3.console.bigcavemaps.com.key:/certs/console/private.key:ro \
2023-09-05 11:40:31 -04:00
--publish 9000:9000 \
--publish 9090:9090 \
quay.io/minio/minio:latest server /data --console-address ":9090" --certs-dir /certs
}
down () {
docker stop minio || true
docker rm minio || true
}
logs () {
docker logs --follow minio
}
$@