Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving port bindings #5

Open
stuartpb opened this issue Jul 30, 2014 · 0 comments
Open

Saving port bindings #5

stuartpb opened this issue Jul 30, 2014 · 0 comments

Comments

@stuartpb
Copy link
Member

So, when I moved port host interface publishing out of start-web-deploy and into this, I also removed the PORT file.

The way Dokku is supposed to work, apps get bound to a host port as an alternative to having a domain name. However, Dokku doesn't do anything to redeploy to that port (even though it saves its value), so in reality the port (possibly/probably) changes every time the app is redeployed (every restart and every push).

Now, it could be arranged that a plugin could bind the app to a persistent port, either letting the port be specified manually or saving the randomly-assigned port from Docker and re-using it on every future deploy. (That plugin would then be in charge of determining how it would save its bound ports, probably by reintroducing the PORT file.)

That plugin could even, in theory, be this one. However, this plugin's view of published ports is more that they are an unfortunate side-effect (one that alternative plugins should rectify). If this app is going to do anything with published ports, it would be to hide them from non-loopback interfaces using something like iptables.

Perhaps this plugin should call out to an app-port-published hook, and only default to randomly binding the port if the hook yields no output. (If it does yield output, we let that plugin handle the Docker option itself: it should be allowed to work in the absence of a plugin like this one.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant