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

Central Port registry to preserve docker container ports on reboot #94

Closed
wants to merge 2 commits into from

Conversation

eugeneware
Copy link
Contributor

When a server reboots all the dynamic port mappings from Docker get reset leading to 502 bad gateway errors in Nginx, or even worse: the wrong servers displaying for different host names.

This PR addresses the issue in #82

It creates a new upstart service called dokku-ports.conf which is run after docker which exposes a simple HTTP service that keeps track of the next free docker port.

The dokku script can then ask this service for the next service and then bind it directly upon container creation, rather than a dynamic binding.

The next available port is stored in ~git/port. Upon startup the service checks the ports on all the running docker containers, and makes sure that the next port won't conflict with any running containers.

This is an alternative to rewriting the nginx.conf files in this alternative pull request

@ghost
Copy link

ghost commented Aug 16, 2013

Merged #178

@ghost ghost closed this Aug 16, 2013
@asm89
Copy link
Contributor

asm89 commented Aug 16, 2013

see #88

This pull request was closed.
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

Successfully merging this pull request may close these issues.

None yet

2 participants