Open OnkelTem opened 6 years ago
Why do you want to put the apps into different compose files instead of putting them all in the same compose file?
You can get around the network remove error by making the docker-compose
files 2 and 3 use an external network for default
. https://docs.docker.com/compose/networking/#configure-the-default-network
Why do you want to put the apps into different compose files instead of putting them all in the same compose file?
Daniel. How would I run my applications separately then? I can't use Dobi for that. Which means that I can use only docker-compose, so is that what you propose now - using both docker-compose AND Dobi at the same time?
The need of Dobi appears exactly when you want to have something more than that bloody docker-compose
which is unable to comprehend a TASK concept. Now we have yet another tool which is unable to comprehend a SERVICE concept and not only that - being absolutely eligible and potent to automate docker-compose
tasks (like up service
, run service
, build service
), it like refuses to be more usable than now, like you're obligated (by work in docker-compose team maybe?) to not doing something which docker-compose already does.
And I already opened a question about making Dobi a replacement for docker-compose but you have declined the proposition. Now when I have almost completed setup which is based on Dobi and uses docker-compose files only as a workaround to overcome the missing concept of service in Dobi, I can prove it to you: there is no need for docker-compose at all if only you make a little step forward with Dobi development.
You can get around the network remove error by making the docker-compose files 2 and 3 use an external network for default. https://docs.docker.com/compose/networking/#configure-the-default-network
One more pair of crutches? Thanks I'll take a look.
there is no need for docker-compose at all if only you make a little step forward with Dobi development.
Yes I agree. I would like to add the service concept, but I haven't had the time.
I haven't had the time.
heh, that's what I've just guessed in the famous #45 ticket :)
So I have the following services defined in my
dobi.yaml
:A side note: the reason why I have to create garbage
docker-compose.*.yml
for every app is that Dobi unable to run tasks in background, it wants docker-compose for itself, not matter is it really needed or not. See #42 for more info.So they are started without problems:
But then I can't stop them. No matter in which order I enumerate resources in the
task
property of thestop
alias I always get an error message like:Also, without recently added
:detach
task I could not even have been able to run dependent services ("composes") since Dobi is always exiting any previouscompose
d containers before starting a new one (this is however not the case forjob
+ a dependentcompose
- then it seems to not require:detach
and usual:up
works pretty well).Placing apps and db in a separate docker-compose has the following drawbacks:
I need to run apps separately, e.g.
dobi app1-start
/dobi app1-stop
etc and so to get this all working I'd have to create a Cartesian product of every combination of apps and database, having a lot of duplicating records and docker-compose files like:My jobs depend on at least
db
docker compose service so I need to depend on it in thedobi.yaml
. So having it listed in there is inevitable.