Paul's Programming Notes     Archive     Feed     Github

Dokku Flask Port and Host

In your flask application, you need to:

  • Set default port=5000 (this seems to be Dokku's default too)
  • Set default host=0.0.0.0 (this allows your host server to connect to the container)

In your Procfile:
web: python <your-app>.py

If you're using gunicorn, it shouldn't matter because it's not using app.run().

If you still can't connect to your application after it deploys, see this: http://www.paulsprogrammingnotes.com/2014/12/troubleshooting-dokku-not-accessible.html