I have an application deployed with a Procfile containing:
web: gunicorn myapp.wsgi:application
dash: python mydash
The 'web' entry runs on port 5000 and works perfectly.
When I try to enable 'dash' which runs on port 3099 by running:
ssh -t dokku@myserver proxy:ports-add myapp http:3099:3099
It adds an entry to nginx pointing to port 3099 on the IP for the 'web' container. The 'dash' container has a different IP. Is it possible to add a proxy port to a secondary container?
From our documentation:
The web proctype is the only proctype that will invoke custom checks as defined by a CHECKS file. It is also the only process type that will be launched in a container that is either proxied via nginx or bound to an external port.
If you wish to expose more than one port via the Dokku proxy layer, you will need to implement such a thing in your own custom proxy implementation. The default Dokku proxy implementation - nginx - has no such support and we have no immediate plans to implement such a thing.
For reference, if you wanted to make your own plugin, here is the start of the block of code that handles this.
I missed that. Thanks for the pointer.
Semi-related, we _also_ don't expose the ip/port metadata in an easy fashion as we do for the web process. That logic goes here. It should be possible to get it, though, via docker inspect.
I'll get to it eventually. For the moment, I basically pushed up two copies of the app, one with the original Procfile and another with the 'dash' renamed to 'web' as a work-around. They really should be two separate apps, I'm just lazy/slammed with other stuff at the moment. ;)
Most helpful comment
Semi-related, we _also_ don't expose the ip/port metadata in an easy fashion as we do for the web process. That logic goes here. It should be possible to get it, though, via docker inspect.