mimischi / minio-dokku

Dockerfile to run Minio (S3 compatible storage) on Dokku (mini-Heroku)
137 stars 44 forks source link

Add instruction about port mapping #4

Closed supermomonga closed 6 years ago

supermomonga commented 7 years ago

Situation

I think we (dokku users) expects applications which is deployed to dokku will be exposed 80 port of each application's virtual hostname. For example, an app which named app-foo is expected to be exposed as app-foo.example.com:80.

Because minio-dokku's Dockerfile extends the minio's official Dockerfile. It contins EXPOSE 9000 so dokku will create port mapping configuration to host minio on 9000 port on host.

Detailed rule of port mapping auto generation: http://dokku.viewdocs.io/dokku/advanced-usage/proxy-management/#proxy-port-mapping

By default, buildpack apps and dockerfile apps without explicitly exposed ports (i.e. using the EXPOSE directive) will be configured with a listener on port 80 (and additionally a listener on 443 if ssl is enabled) that will proxy to the application container on port 5000. Dockerfile apps with explicitly exposed ports will be configured with a listener on each exposed port and will proxy to that same port of the deployed application container.

The best way is start mino server with --address ":5000" option and not use EXPOSE command in Dockerfile, but we can't remove parent Dockerfile's EXPOSE command for now, so we can't change default port-mapping by Dockerfile while it extends minio's official Dockerfile.

Solution

I added to instruction to avoid http:9000:9000 port mapping and create http:80:5000 one.

slypix commented 6 years ago

Sorry for the late reply, I greatly appreciate your contribution to this repo, it has been included in a later pull request.

Thank you