Composing A Server
We're picking up right where we left off yesterday. I also need to give thought to the concept of rewriting all of my Docker containers in Compose stacks. Right now, everything – except for InvenTree, because it needed four whole containers – is just handled through Unraid's Docker manager. Which is fine.
But for whatever reason, Docker/Compose won't allow containers to connect to both the default bridge network and any other networks. You either use custom networks, or you use bridge mode. So, in the InvenTree example, I was either exposing all four containers on the bridge, or I had to manually configure Traefik to create a router/service connecting to a classically bound port on the host independently of the containers. This works, but it's inelegant.
I figure, I can create a custom Traefik bridge network that'll just wind up being a replacement for the bridge, but as a custom network that I can actually connect to. I can even configure single containers to just use that network directly, in the Unraid manager, so I wouldn't even need to Composerize them. But moving 40-something containers, even like that, is a tedious process. Which makes it difficult for me to motivate myself to do.
And then there's SQL. I have single containers of Postgres, MariaDB, and Mongo which are connected to by multiple other containers. Antithetical to the Composer methodology. So, ideally, I'd take all of those and replicate them in individual database instances for each container. But again. A lot of work.