Closed rhubarbselleven closed 1 year ago
Also, as a developer I cannot rely on being able to bind privileged ports due to not having privilege escalation
FYI:
Ports 80
and 443
are the only ports which will work because of the haproxy
configuration.
An example of exposing a different port can be found in the link below, but pygmy
would still need to be wired up accordingly.
That could delegate to a variable as well. Further down you can see where you’re pulling in the Amazee env variables.
Port 443 is still a privileged port and in a development environment we may not be able to bind these ports either for preference or because of not having access rights to do so.
On Thu, 5 Dec 2019 at 7:48 am, Karl Hepworth notifications@github.com wrote:
FYI:
Ports 80 and 443 are the only ports which will work because of the haproxy configuration.
- https://github.com/amazeeio/docker-haproxy/blob/master/haproxy.tmpl#L29
https://github.com/amazeeio/docker-haproxy/blob/master/haproxy.tmpl#L51
An example of exposing a different port can be found in the link below, but pygmy would still need to be wired up accordingly.
- fubarhouse/docker-haproxy@70317d6 https://github.com/fubarhouse/docker-haproxy/commit/70317d602268a3dfae1f9df832b7162a946a0b1e
I could see if I can open a PR to switch to https (443) instead of 80 - but those are your only choices with the configuration of what is available.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/amazeeio/pygmy/issues/46?email_source=notifications&email_token=AAJM5JVYH7WQNJ5ESOEWZJDQXAJSLA5CNFSM4JGCD472YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEF6ODWQ#issuecomment-561832410, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJM5JQQ6U7CCBJUEVVAQKTQXAJSLANCNFSM4JGCD47Q .
Check out the PR - if you use that version you can run pygmy up
and it will only bind to port 80.
pygmy up --port 443
will run the container on port 443 for HTTPS.
You may need to remove the containers if they've already been created prior to use though - pygmy stop -d
Subscribing as I'd like to see configurable ports too if that's somehow possible.
https://github.com/pygmystack/pygmy supports this
I may have existing services already running and may not want to shut them down in order to develop.
Please make this here: https://github.com/amazeeio/pygmy/blob/master/lib/pygmy/haproxy.rb#L17 configurable