Closed rsau closed 2 years ago
hi @rsau - here is a sample config to run on a different port (in this case 8080) - as long as you're running the more recent pygmy (formerly pygmy-go)
$ cat ~/.pygmy.yml
services:
amazeeio-haproxy:
HostConfig:
PortBindings:
80/tcp:
- HostPort: 8080
443/tcp:
- HostPort: 443
Thank you @tobybellwood for quick response.
It worked. I installed pygmy via brew so it has latest release.
it looks like if I export config and make changes to port, it fails to read that file
Is there a chance that in future it picks next available ports automatically? Issue can be closed otherwise.
I'll create another issue for bug about exported config file generating yaml warning/errors.
When I had changed the above values in exported config earlier, pygmy didn't pick them up.
yup - I'm not sure why it doesn't like the export, but a ticket would help us track it.
I know we've looked at alternate/fallback port configuration before, I'll see where that is up to.
A dynamic port for specified containers is completely feasible and wouldn't take a lot of time to implement.
Exported config should inherit custom changes, but I can look into that as well.
Created #374 and closing this one.
Is your feature request related to a problem? Please describe.
I also use lando for local development. If I start pygmy first, it uses 80, 443 by default as expected. Now when I start lando later it also tries 80, 443 first but if they are assigned to other process, it picks next available which is fine.
In a scenario where I start lando first and pygmy after, pygmy fails to start because it has been hard coded to use 80, 443. Is there a way to make pygmy also picks next available port if port is already in use.
Describe the solution you'd like
Keep the default as 80, 443 but check port availability and pick next available port instead of throwing error
Describe alternatives you've considered I exported config using
pygmy export
and changed ports in the config but still get error. It is reading config file which is evident from yaml warnings but doesn't read ports info.It is posible that pygmy discards the exported config file due to yaml errors and falls back to defaults but there is no explicit message about that.
Previously I used https://github.com/amazeeio/amazeeio-docker-windows/blob/master/docker-compose.yml but it looks like project is abandoned. It is pretty easy to override ports at https://github.com/amazeeio/amazeeio-docker-windows/blob/master/docker-compose.yml#L16
Thanks