dockercloud-haproxy icon indicating copy to clipboard operation
dockercloud-haproxy copied to clipboard

imcompatible with docker compose 1.23

Open DeoLeung opened this issue 7 years ago • 5 comments
trafficstars

seems the container naming schema changed, which may be the cause that it can't find the containers

DeoLeung avatar Nov 10 '18 19:11 DeoLeung

I roll compose back to 1.22.0 and it works

DeoLeung avatar Nov 10 '18 19:11 DeoLeung

Took me a while to figure out why it wasn't working. I can confirm the new naming schema breaks the image.

rubenfonseca avatar Nov 14 '18 12:11 rubenfonseca

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

jorihardman avatar Nov 20 '18 17:11 jorihardman

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)

cnadeau avatar Nov 21 '18 17:11 cnadeau

https://github.com/docker/compose/releases - 1.23.2 has reverted back to _1 names

db260179 avatar Dec 11 '18 10:12 db260179