It's potentially possible. I'd have to look at it again to verify.
What we were struggling with were "conditional services" like running Integration Tests. We only wanted to add that container to the cluster when we wanted to run the tests.
Same with the "demo" mode we added. That spins up an Nginx container with an example front-end app.
It's theoretically possible to define all of the containers in one big Docker Compose config and then turn them on/off with env variables per environment, but it's just hellish to debug. In fact, I suspect that's what the engineer that wrote those started with before getting frustrated with spaghetti.
Sometimes there is just no winning with the computers lol
Edit: Answering the "it isn't 4 commands" bit -- if you just restart a container it won't pick up changes to the Docker Compose config. You have to remove it an add it back to the cluster.
Anyway, wrapping everything in a dev command makes a lot of sense for DX,
and then if generating docker-compose.yml files or importing miniboss is the most straightforward/reliable/maintainable way, all good
If you're dockerizing a dev environment check out batect, it's kind of like the combo of docker-compose + make (i.e. simple script running) that is really the tool we all just want: https://batect.dev/ It can easily define one-off container tasks like integration test runs with just a couple lines of config.
I will check this out. Thank you! I'll also make sure that the "Docker Awesome" list has this info too. I bet there are some cool projects there (and the OPs GitHub project should be added too, come to think of it).
What we were struggling with were "conditional services" like running Integration Tests. We only wanted to add that container to the cluster when we wanted to run the tests.
Same with the "demo" mode we added. That spins up an Nginx container with an example front-end app.
It's theoretically possible to define all of the containers in one big Docker Compose config and then turn them on/off with env variables per environment, but it's just hellish to debug. In fact, I suspect that's what the engineer that wrote those started with before getting frustrated with spaghetti.
Sometimes there is just no winning with the computers lol
Edit: Answering the "it isn't 4 commands" bit -- if you just restart a container it won't pick up changes to the Docker Compose config. You have to remove it an add it back to the cluster.