#!/usr/bin/env bash

set -e

NAME=minio
USER=rclone
PASS=AxedBodedGinger7
PORT=28625

. $(dirname "$0")/docker.bash

start() {
    docker run --rm -d --name $NAME \
           -e "MINIO_ACCESS_KEY=$USER" \
           -e "MINIO_SECRET_KEY=$PASS" \
           -p 127.0.0.1:${PORT}:9000 \
           minio/minio server /data
    
    echo type=s3
    echo provider=Minio
    echo access_key_id=$USER
    echo secret_access_key=$PASS
    echo endpoint=http://127.0.0.1:${PORT}/
    echo _connect=127.0.0.1:${PORT}
}

. $(dirname "$0")/run.bash
