Open DeoLeung opened 5 years ago
I roll compose back to 1.22.0 and it works
Took me a while to figure out why it wasn't working. I can confirm the new naming schema breaks the image.
A workaround is to use container_name
to change the name of your linked container back to what haproxy expects.
Example from my compose file:
services:
rails:
container_name: rails_server_rails_1
...
haproxy:
links:
- rails
...
That fixed it for me in 1.23.1
Thanks @jorihardman 🎉
one thing I had to figure out. You need to have the env var LINK_MODE:'new' for that workaround to work
the new parser handles the container_name
Introduced here (I know, a while back)
https://github.com/docker/compose/releases - 1.23.2 has reverted back to _1 names
seems the container naming schema changed, which may be the cause that it can't find the containers