TkTech / minio_on_dokku

Dockerfile to run Minio (S3 compatible storage) on Dokku (mini-Heroku)

Home Page:https://min.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Minio Dokku Maintenance

Run Minio on Dokku

Perquisites

What is Minio?

Minio is an object storage server, and API compatible with Amazon S3 cloud storage service. Read more at the minio.io website.

What is Dokku?

Dokku is the smallest PaaS implementation you've ever seen - Docker powered mini-Heroku.

Requirements

Setup

Note: We are going to use the domain minio.example.com for demonstration purposes. Make sure to replace it to your domain name.

Create the app

Log onto your Dokku Host to create the Minio app:

dokku apps:create minio

Configuration

Setting root user

Minio use username/password (MINIO_ROOT_USER and MINIO_ROOT_PASSWORD) for authentication and object management.

dokku config:set minio MINIO_ROOT_USER=<username>
dokku config:set minio MINIO_ROOT_PASSWORD=<password>

Change the upload size limit

To modify the upload limit you have to modify the environment variable CLIENT_MAX_BODY_SIZE used by Dokku, here we have given the max value of 10mb

dokku config:set minio CLIENT_MAX_BODY_SIZE=10M

Persistent storage

To persists uploaded data between restarts, we create a folder on the host machine, add write permissions to the user defined in Dockerfile and tell Dokku to mount it to the app container.

dokku storage:ensure-directory minio
dokku storage:mount minio /var/lib/dokku/data/storage/minio:/data

Domain setup

To get the routing working, we need to apply a few settings. First we set the domain.

dokku domains:set minio minio.example.com

Push Minio to Dokku

Grabbing the repository

First clone this repository onto your machine.

Via SSH

git clone git@github.com:d1ceward/minio_on_dokku.git

Via HTTPS

git clone https://github.com/d1ceward/minio_on_dokku.git

Set up git remote

Now you need to set up your Dokku server as a remote.

git remote add dokku dokku@example.com:minio

Push Minio

Now we can push Minio to Dokku (before moving on to the next part).

git push dokku master

SSL certificate

Last but not least, we can go an grab the SSL certificate from Let's Encrypt.

# Install letsencrypt plugin
dokku plugin:install https://github.com/dokku/dokku-letsencrypt.git

# Set certificate contact email
dokku config:set --no-restart minio DOKKU_LETSENCRYPT_EMAIL=you@example.com

# Generate certificate
dokku letsencrypt:enable minio

Wrapping up

Your Minio instance should now be available on https://minio.example.com.

To allow access to the Minio web console :

# If ssl enabled
dokku proxy:ports-add minio https:8443:8443

# If ssl disabled (note scheme change)
dokku proxy:ports-add minio http:8443:8443

And go to https://minio.example.com:8443

About

Dockerfile to run Minio (S3 compatible storage) on Dokku (mini-Heroku)

https://min.io

License:The Unlicense


Languages

Language:Dockerfile 65.6%Language:Shell 34.4%