Skip to content

Commit

Permalink
dokku_ports: set port instead of add port (#91)
Browse files Browse the repository at this point in the history
Since new apps are created with a default port mapping (for http/https)
already, adding new port mappings using `proxy:ports-add` has no effect
on actual behavior since dokku will simply continue to use the port
mappings defined initially.

In order to be of practical use, `dokku_ports` should use
`proxy:ports-set` instead of `proxy:ports-add`.
ltalirz authored Nov 8, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 1c996a5 commit 31fac31
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -478,7 +478,7 @@ Manage ports for a given dokku application
#### Example

```yaml
- name: proxy:ports-add hello-world http:80:80
- name: proxy:ports-set hello-world http:80:80
dokku_ports:
app: hello-world
mappings:
4 changes: 2 additions & 2 deletions library/dokku_ports.py
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@
"""

EXAMPLES = """
- name: proxy:ports-add hello-world http:80:80
- name: proxy:ports-set hello-world http:80:80
dokku_ports:
app: hello-world
mappings:
@@ -163,7 +163,7 @@ def dokku_proxy_ports_present(data):
meta["present"] = True
return (is_error, has_changed, meta)

command = "dokku --quiet proxy:ports-add {0} {1}".format(
command = "dokku --quiet proxy:ports-set {0} {1}".format(
data["app"], " ".join(to_add)
)
try:

0 comments on commit 31fac31

Please sign in to comment.