Closed kinghuang closed 8 years ago
Thanks for this report!
I've been making a lot of changes to the Docker Compose setup as it's used in the test suite to automate setting up a test cluster, and some of them broke more normal uses of Docker Compose. The problem you note was actually deliberate, but it does break the instructions in the readme :) This is done for the Docker Compose "links" feature, so that the Bottled Water container can address whichever Postgres is running simply by the hostname "postgres". This works fine in the tests, which run docker-compose up --no-deps [service]
and explicitly start just one of the Postgressen, but on the command line a simple docker-compose up bottledwater-json
will attempt to start both, and fail because they attempt to bind the same host port.
As a workaround, I've submitted PR #106 which assigns different host ports to each Postgres service, so they no longer clash. This still means you'll end up redundantly running one more Postgres than you actually wanted, but that should be fairly harmless.
Ah, thanks for the detailed explanation here and PR #106! I was indeed trying to follow the README instructions.
I've just merged that PR so the instructions in the README ought to work now. Do let me know if you're still having problems!
The bottledwater-json and bottledwater-avro services in the Docker Compose file has links to both the postgres and postgres-94 services. The postgres services both have a port mapping for 45432 on the host, which causes an error when starting bottledwater-json or bottledwater-avro.
bottledwater-json and bottledwater-avro should probably just link to postgres only, dropping postgres-94.