libresh / compose-known

Known docker-compose for libre.sh v1
Other
14 stars 8 forks source link

Backend cannot connect to app, if another is linked to frontend-web #19

Open almereyda opened 6 years ago

almereyda commented 6 years ago

If there is another app container linked to the frontend-web/lb_web network of libre.sh, this will take precedence over the app container defined here.

This happens due to the naming of the upstream in nginx.conf.

Renaming the inner container and adapting the configuration file helped.

But how to circumvent this generally?

pierreozoux commented 6 years ago

This is not true (or I didn't understand your problem). The app container is just the docker-compose name, then the docker name would be: microblogpierreofr_app_1, you see what I mean? And then, it is fine.

almereyda commented 6 years ago

The nginx.conf only specifies an upstream container called app. If there is another container called app in the frontend-web/lb_web network, it accidentally tries to forward requests to this one, instead of the one accessible via the backend network.

pierreozoux commented 6 years ago

ah yes, if in frontend-web/lb_web you have a container that is exactly called "app" then you have an issue. You shouldn't do it ;)

almereyda commented 6 years ago

This also happens for containers that are called app#, as they will be aliased with app, too.

This behaviour enforces a strict naming scheme on the containers linked to frontend-web/lb_web

On 1 May 2018 at 15:15, Pierre Ozoux notifications@github.com wrote:

ah yes, if in frontend-web/lb_web you have a container that is exactly called "app" then you have an issue. You shouldn't do it ;)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/libresh/compose-known/issues/19#issuecomment-385668095, or mute the thread https://github.com/notifications/unsubscribe-auth/ABka_NTKIfSNwIGUWLs57XKCfQfSTCZcks5tuGADgaJpZM4TtHI7 .

pierreozoux commented 6 years ago

Ah ok I understand now. I think I all call them web that why never had the issue.