-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
High-level Plan
- Ensure we call
network-write-ipaddrfor all process types - Add support for fetching non-web listeners to
network-get-listenersas the second variable - Keep track of all listener types in
DOKKU_APP_${PROC_TYPE}_LISTENERS - Append the above variable mapping to the list of variables passed to the nginx template via sigil
- Update the docs
Original Comment
I would like to be able to deploy an application and route some requests to a non-web process (for example, a Rails application with a separate Node.js process that deals with streaming connections).
At the moment, only the web containers are available for use in the nginx.conf.sigil template (via the $.DOKKU_APP_LISTENERS variable). I can see for simplicity that it might make sense not to add non-web containers to $.DOKKU_APP_LISTENERS, but at the moment I don't think I can even write a custom plugin or Buildpack to add the behaviour that I want, without replicating the parts of Dokku's internals to determine what the internal IPs & ports of those other containers are.
From what I can tell, the $.DOKKU_APP_LISTENERS value is constructed from the contents of the files IP.web.* and PORT.web.* in the /home/dokku/<app> directory. Would it be feasible to have deployment write out IP.<proctype>.<instance> and PORT.<proctype>.instance files for all containers, rather than just web ones? With that, I'd be able to write a plugin that modified the nginx configuration to my needs.