My server has traefik (defined in a compose file), and multiple other apps (each in its own compose file). Each app's compose file defines a shared network; it is used by both the app and traefik. Everything works so far.
However, now I added another app (with its own compose file), and it needs multiple networks: a shared network (for it and traefik), one to be shared by it and the database, another for it and redis, etc.
For some reason, it sometimes works, and sometimes I get a Gateway Timeout error. It's really confusing - because it works for a while, then fails, I restart traefik, it works for a while, then fails, etc.
If so, why is this necesary when there are multiple networks for an app, and not when the app has only one network? And of course, how come it works sometimes and sometimes not?