umbrel
umbrel copied to clipboard
Using docker compose instead of docker-compose
docker-compose is the V1 syntax, which is now deprecated. The V2 syntax is docker compose, since it's now a plugin and not a separate command.
This pull request should fix #1785
So, it turns out docker compose now names containers <app>-<container>-<no> and not <app>_<container>_<no>, which will break all apps using app_proxy. Don't merge this yet, I'll figure out a solution
Okay, I don't know what to do. docker dash compose is clearly broken, but space compose has a different naming schema. Hmmm....
It turns out docker compose has a compatibility flag, but that is not a good long term solution. I don't want to implement this right now since temporary is the most permanent.
The issue can be dealt with by running docker compose down after every test.
In docker compose guides I've seen inter-container networking being done by just using the container name (without app_id and _1). @lukechilds Why didn't you use this here?
Ok, so Umbrel v1.0 already uses the new compose. I'm just on 0.5
In docker compose guides I've seen inter-container networking being done by just using the container name (without app_id and _1). @lukechilds Why didn't you use this here?
We don't rely on that because it can have collisions between apps, e.g if two apps have a db container and you reference it via my-service --connnect db:1234 it can randomly connect to either db container from the different apps on each request.
Using the full container name guarantees uniqueness and avoids collisions.
So, it turns out docker compose now names containers
- - and not , which will break all apps using app_proxy. Don't merge this yet, I'll figure out a solution
Yeah that was a pain, we handled this in 1.0 by manually patching all compose files to force the container name to the old pattern: https://github.com/getumbrel/umbrel/blob/ace3d9d2e528c798fab0b75b8000b16f30d2aa3b/packages/umbreld/source/modules/apps/app.ts#L93-L109
So, it turns out docker compose now names containers -- and not , which will break all apps using app_proxy. Don't merge this yet, I'll figure out a solution
Yeah that was a pain, we handled this in 1.0 by manually patching all compose files to force the container name to the old pattern
Got it. Thanks!