Skip to content
This repository has been archived by the owner on Nov 8, 2018. It is now read-only.

Make port configurable for MySQL (other ports too?) #10

Closed
pjedrzejewski opened this issue Oct 16, 2017 · 2 comments
Closed

Make port configurable for MySQL (other ports too?) #10

pjedrzejewski opened this issue Oct 16, 2017 · 2 comments

Comments

@pjedrzejewski
Copy link
Member

ERROR: for mysql Cannot start service mysql: driver failed programming external connectivity on endpoint docker_mysql_1 (ad2d3430d8c5c83aba9633c20b10c4ebb7df8090bf6828b86072401e67c08173): Error starting userland proxy: Bind for 127.0.0.1:3306 failed: port is already allocated
ERROR: Encountered errors while bringing up the project."

@adepretis
Copy link
Contributor

adepretis commented Oct 17, 2017

You would have to edit docker-compose.yml for that. There is the possibility to use docker-compose.local.yml (see PR #12) but docker-compose merges YAML arrays and does not replace them (there is an open PR for that - docker/compose#3939).

We could use ENV variables to achieve this, e.g.:

$(eval $(call defw,MYSQL_EXPOSE_PORT=

make MYSQL_EXPOSE_PORT=4711 up

and

```yaml
services:
  mysql:
    ports:
      - ${MYSQL_EXPOSE_PORT}:3306

but I would prefer to keep the amount of ENV vars for controlling the whole development environment at a minimum and not drown in ENVs ;-)

Changing/Extending the initial configuration including ports has been documented in the README.md, which I think is enough for now. What do you think?

I also just changed the default exposed port from 3306 to 3606 (see b27fec4)

@pjedrzejewski
Copy link
Member Author

Info in README is enough and I agree we should avoid adding 10s of ENV vars. Closing this, thanks Andreas!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants