dnephin / dobi

A build automation tool for Docker applications
https://dnephin.github.io/dobi/
Apache License 2.0
311 stars 36 forks source link

compose resource - where is service specification and how to run them? #115

Closed OnkelTem closed 6 years ago

OnkelTem commented 6 years ago

I can't find in the docs how to specify a service in compose resource in dobi.yaml. Also there is no :run task for compose resource type. So the only thing you can do with compose is to run everything with single up command.

This highly limits the use of docker-compose and dobi together and the only way to workaround this is to create lots of duplicating docker-compose files (for every possible invocation) with duplicating specifications. Needless to say it's hard to maintain. And seeing all this I give up on using Dobi one more time :(

dnephin commented 6 years ago

So the only thing you can do with compose is to run everything with single up command.

That is correct, that is by design. The way to support individual services would be to define them in the dobi.yaml (issue #45)

And seeing all this I give up on using Dobi one more time

I'm sorry to hear that dobi isn't working for your use case. I must admit I don't really understand what it is you are trying to accomplish. It could be that a service resource is really necessary to satisfy your use case. Since that feature is already being tracked in #45 I'm going to close this issue.

OnkelTem commented 6 years ago

While #45 sounds like a must have feature - yeah - I don't see how it's gonna cover the lack of run or service specifications. So this is a feature request:

I must admit I don't really understand what it is you are trying to accomplish.

Just a simple thing: to use docker-composer with dobi. And currently that not possible. You left us only 'up' thing, as if it was the main or only thing in docker-compose while it's actually not.

I came here from a discussion in docker-compose issue queue, where we have been requesting ~for years~ for a long time for some simple feature like making a service not required (not default), and despite of hundreds of votes for this feature, we were told that the view of the developers is different, it is so that docker-compose is more a service oriented thing, for task-oriented stuff - check out dobi. While nobody can really explain wtf does that mean.

dnephin commented 6 years ago

add :run task to composer resource.

docker-compose run is really a problem. It's using a service definition as a job. This is one of the major problems that I'd like to fix with dobi. docker-compose run should be replaced with job= tasks.

You left us only 'up' thing, as if it was the main or only thing in docker-compose while it's actually not.

I really should be the main thing that docker-compose does (along with down). Everything else doesn't really fix well with the design.

docker-compose is more a service oriented thing, for task-oriented stuff - check out dobi. While nobody can really explain wtf does that mean.

Both of these types of processes use containers, but they have very different properties and need to be treated differently in an automated build system.

OnkelTem commented 6 years ago

docker-compose run is really a problem. It's using a service definition as a job. This is one of the major problems that I'd like to fix with dobi. docker-compose run should be replaced with job= tasks.

I'm totally agree with you that mixing up services and jobs makes the whole system kind of obscure.

Also, I approve your definition of task and service, and recollecting some details of the discussion I'm referencing - the main request was to make some services optional. I barely can imagine a use case for that, but it's clear that people were trying to use services as tasks.