Skip to content

Commit

Permalink
Open port 443 by default (#324)
Browse files Browse the repository at this point in the history
Signed-off-by: Karl Hepworth <karl.hepworth@gmail.com>
  • Loading branch information
fubarhouse committed Jun 22, 2021
1 parent cad0b4c commit 58332b1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions service/haproxy/haproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ func NewDefaultPorts() model.Service {
HostPort: "80",
},
},
"443/tcp": []nat.PortBinding{
{
HostIP: "",
HostPort: "443",
},
},
},
},
}
Expand Down
2 changes: 1 addition & 1 deletion service/haproxy/haproxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ func Test(t *testing.T) {
So(obj.HostConfig.PortBindings, ShouldEqual, nil)
So(obj.HostConfig.RestartPolicy.Name, ShouldEqual, "unless-stopped")
So(obj.HostConfig.RestartPolicy.MaximumRetryCount, ShouldEqual, 0)
So(fmt.Sprint(objPorts.HostConfig.PortBindings), ShouldEqual, fmt.Sprint(nat.PortMap{"80/tcp": []nat.PortBinding{{HostIP: "", HostPort: "80"}}}))
So(fmt.Sprint(objPorts.HostConfig.PortBindings), ShouldEqual, fmt.Sprint(nat.PortMap{"80/tcp": []nat.PortBinding{{HostIP: "", HostPort: "80"}}, "443/tcp": []nat.PortBinding{{HostIP: "", HostPort: "443"}}}))
})
}

0 comments on commit 58332b1

Please sign in to comment.