这是indexloc提供的服务,不要输入任何密码
Skip to content

Get/Store IP addresses and ports of non-web containers #3258

@lazyatom

Description

@lazyatom

High-level Plan

  • Ensure we call network-write-ipaddr for all process types
  • Add support for fetching non-web listeners to network-get-listeners as 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions