{"id":23814486,"url":"https://github.com/stuartpb/dokku-bind-port","last_synced_at":"2025-09-06T23:31:58.396Z","repository":{"id":14196571,"uuid":"16903141","full_name":"stuartpb/dokku-bind-port","owner":"stuartpb","description":"Dokku plugin for binding app container ports to host interfaces","archived":false,"fork":false,"pushed_at":"2015-04-28T20:21:22.000Z","size":215,"stargazers_count":16,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-09T22:14:40.327Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stuartpb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-17T05:46:08.000Z","updated_at":"2024-04-09T22:14:40.327Z","dependencies_parsed_at":"2022-08-30T05:22:08.583Z","dependency_job_id":null,"html_url":"https://github.com/stuartpb/dokku-bind-port","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuartpb%2Fdokku-bind-port","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuartpb%2Fdokku-bind-port/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuartpb%2Fdokku-bind-port/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuartpb%2Fdokku-bind-port/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stuartpb","download_url":"https://codeload.github.com/stuartpb/dokku-bind-port/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232149972,"owners_count":18479564,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-02T03:47:50.006Z","updated_at":"2025-01-02T03:47:50.579Z","avatar_url":"https://github.com/stuartpb.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"## This project is deprecated\n\nWhen this plugin was written, Dokku restarted app servers by first stopping the old build, then starting the new build. However, Dokku has since changed the way it restarts app servers to start the new build *before* stopping the old build: if the app's port is bound, this causes a conflict between the old instance and the new one (as the old instance doesn't relinquish the port until it is stopped), and **new builds will fail to start**. (See [issue #5][].)\n\n[issue #5]: https://github.com/stuartpb/dokku-bind-port/issues/5\n\nBesides that major issue with port binding, this plugin's functionality can entirely be duplicated by setting `-p` options for `docker run` using the [dokku-docker-options][] plugin, which is also significantly more simple and versatile (allowing one to achieve other goals, such as mounting a volume in an app).\n\n[dokku-docker-options]: https://github.com/dyson/dokku-docker-options\n\nUltimately, since mid/late 2014, I've personally stopped using Dokku altogether, switching to [Plushu][] instead. If you want this plugin's functionality in Plushu, you can use the [plushu-app-docker-opts][] plugin to add a `-p 5000:80` option to the app. You will also need to create a file named `SINGLE_INSTANCE` in the app's directory (using a direct shell account to the Plushu server):\n\n```bash\nssh root@plushu.example.com su -s /bin/sh -c \"touch /home/plushu/apps/$app/SINGLE_INSTANCE\" plushu\n```\n\nThis tells the Plushu local app deployment plugin to stop the old build before starting the new one, avoiding the aforementioned issue with concurrent builds seen with Dokku.\n\n[Plushu]: https://github.com/plushu/plushu\n[plushu-app-docker-opts]: https://github.com/plushu/plushu-app-docker-opts\n\n# dokku-bind-port\n\nDokku plugin for binding app container ports to host interfaces\n\nThe code for this plugin is largely based on the\n[dokku-link](https://github.com/rlaneve/dokku-link) plugin, but for `-p`\narguments rather than `-link`, and with the redeployment behavior from\n`dokku config`.\n\n## Requirements\n\nAs this plugin uses the `docker-args` hook, it requires a development version\nof dokku at or after https://github.com/progrium/dokku/commit/c77cbf1.\n\n## Installation\n\n```\ncd /var/lib/dokku/plugins\nsudo git clone https://github.com/stuartpb/dokku-bind-port.git bind-port\n```\n\n## Usage\n\n```\n$ dokku help\n    bind \u003capp\u003e                                    display host bindings for an app\n    bind:create \u003capp\u003e CONTAINER_PORT [HOST_PORT]  create a host binding for an app\n    bind:delete \u003capp\u003e CONTAINER_PORT              delete a host binding for an app\n```\n\nThe `HOST_PORT` argument defaults to the port specified in `CONTAINER_PORT`.\n\nThe `HOST_PORT` argument may include a specific interface to bind to, prefixed\nwith the interface and a colon.\n\nBy default, a port binding specifies TCP: to bind a UDP port, suffix the\n`CONTAINER_PORT` argument with `/udp`.\n\nFor more information, see the Docker documentation on [port redirection][].\n\n[port redirection]: http://docs.docker.io/en/latest/use/port_redirection/#binding-a-port-to-a-host-interface\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2014 Stuart P. Bentley\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstuartpb%2Fdokku-bind-port","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstuartpb%2Fdokku-bind-port","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstuartpb%2Fdokku-bind-port/lists"}