neosync icon indicating copy to clipboard operation
neosync copied to clipboard

[NEOS-1095] update docker compose scripts to check for open ports

Open evisdrenova opened this issue 1 year ago • 1 comments

ran into an port issue when i ran docker compose -f compose.dev.yml because it was trying to stand up a db on 5435 but I was already using that port. Chris from Osmind had some of the same feedback when he was trying to stand us up locally - he had conflicts with an existing set up.

image.png

Would be nice to be able to continue to search for a port if it finds the first port is already allocated, a better user experience compared to the user having to go and update things. For me, I already had a DB that I was actively using on that port so it was annoying to have to update it to use a new port for the docker compose would work.

we can run an init script before any of the containers are created to check what ports are open and then dynamically update the following scripts with those ports. Would have to make sure that we also update the seed scripts with the right port number as well.

From SyncLinear.com | NEOS-1095

evisdrenova avatar May 14 '24 18:05 evisdrenova

I hear you on the open ports thing, however I think this is way more complex than it's worth. A much simpler solution is to just change our default ports to something else.

Many examples on the internet use these ports which is why it is a conflict.

nickzelei avatar May 20 '24 15:05 nickzelei

yeah agreed - might be nice to use some non-standard ports to try and avoid the issue…. until someone is using those ports 😅

evisdrenova avatar May 20 '24 17:05 evisdrenova