#!/bin/bash set -e CERTS=/mammoth/k8s-config/caddy/data/caddy/certificates/acme.zerossl.com-v2-dv90 up () { echo -n "Enter MINIO_ROOT_PASSWORD: " read MINIO_ROOT_PASSWORD docker run \ --detach \ --name minio \ --restart unless-stopped \ --env MINIO_BROWSER_REDIRECT_URL=https://s3.console.bigcavemaps.com \ --env MINIO_ROOT_USER=admin \ --env MINIO_ROOT_PASSWORD=$MINIO_ROOT_PASSWORD \ --env MINIO_SERVER_URL=https://s3.bigcavemaps.com \ --volume /mammoth/minio:/data:rw \ --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 \ --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 } $@