Minio is an object storage server, and API compatible with Amazon S3 cloud storage service. Read more at the minio.io website.
Dokku is the smallest PaaS implementation you've ever seen - Docker powered mini-Heroku.
- A working Dokku host
- Letsencrypt plugin for SSL (optionnal)
Note: We are going to use the domain minio.example.com
for demonstration purposes. Make sure to replace
it to your domain name.
Log onto your Dokku Host to create the Minio app:
dokku apps:create minio
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>
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
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
To get the routing working, we need to apply a few settings. First we set the domain.
dokku domains:set minio minio.example.com
First clone this repository onto your machine.
git clone git@github.com:d1ceward/minio_on_dokku.git
git clone https://github.com/d1ceward/minio_on_dokku.git
Now you need to set up your Dokku server as a remote.
git remote add dokku dokku@example.com:minio
Now we can push Minio to Dokku (before moving on to the next part).
git push dokku master
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
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