GithubHelp home page GithubHelp logo

turicas / minio-dokku Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mimischi/minio-dokku

1.0 2.0 1.0 50 KB

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

Dockerfile 100.00%

minio-dokku's Introduction

Minio Version Dokku Version

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 access keys

Minio uses two access keys (ACCESS_KEY and SECRET_KEY) for authentication and object management. The following commands sets a random strings for each access key.

dokku config:set minio MINIO_ACCESS_KEY=$(echo `openssl rand -base64 45` | tr -d \=+ | cut -c 1-20)
dokku config:set minio MINIO_SECRET_KEY=$(echo `openssl rand -base64 45` | tr -d \=+ | cut -c 1-32)

To login in the browser or via API, you will need to supply both the ACCESS_KEY and SECRET_KEY. You can retrieve these at any time while logged in on your host running dokku via dokku config minio.

Note: If you do not set these keys, Minio will generate them during startup and output them to the log (check if via dokku logs minio). You will still need to set them manually.

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.

sudo mkdir -p /var/lib/dokku/data/storage/minio
sudo chown 32769:32769 /var/lib/dokku/data/storage/minio
dokku storage:mount minio /var/lib/dokku/data/storage/minio:/home/dokku/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

The parent Dockerfile, provided by the Minio project, exposes port 9000 for web requests. Dokku will set up this port for outside communication, as explained in its documentation. Because we want Minio to be available on the default port 80 (or 443 for SSL), we need to fiddle around with the proxy settings.

First add the correct port mapping for this project as defined in the parent Dockerfile.

dokku proxy:ports-add minio http:80:9000

Next remove the proxy mapping added by Dokku.

dokku proxy:ports-remove minio http:80:5000

Push Minio to Dokku

Grabbing the repository

First clone this repository onto your machine.

Via SSH

git clone [email protected]:slypix/minio-dokku.git

Via HTTPS

git clone https://github.com/slypix/minio-dokku.git

Set up git remote

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

git remote add dokku [email protected]: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.

dokku config:set --no-restart minio [email protected]
dokku letsencrypt minio

Wrapping up

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

minio-dokku's People

Contributors

mimischi avatar patoroco avatar slypix avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

conradobio

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.