Customizable Traefik host port

Allow users to free up port 80 on the host machine, without losing
Traefik's Docker routing super-powers.
This commit is contained in:
Chris Lowder
2023-03-04 21:41:08 +00:00
parent 8c69990dbb
commit 963b96ff62
3 changed files with 19 additions and 1 deletions

View File

@@ -12,6 +12,11 @@ class CommandsTraefikTest < ActiveSupport::TestCase
assert_equal \
"docker run --name traefik --detach --restart unless-stopped --log-opt max-size=10m --publish 80:80 --volume /var/run/docker.sock:/var/run/docker.sock traefik --providers.docker --log.level=DEBUG --accesslog.format json --metrics.prometheus.buckets 0.1,0.3,1.2,5.0",
new_command.run.join(" ")
@config[:traefik]["host_port"] = "8080"
assert_equal \
"docker run --name traefik --detach --restart unless-stopped --log-opt max-size=10m --publish 8080:80 --volume /var/run/docker.sock:/var/run/docker.sock traefik --providers.docker --log.level=DEBUG --accesslog.format json --metrics.prometheus.buckets 0.1,0.3,1.2,5.0",
new_command.run.join(" ")
end
test "traefik start" do