2 ms·
Why do you want to set things conditionally like that? This feels like it's a very incorrect solution to a problem that you're making far more complicated than
by Gordonjcp 4y ago
Why do you want to set things conditionally like that?
This feels like it's a very incorrect solution to a problem that you're making far more complicated than it needs to be.
- kh_hk 4y agoI apply this solution exclusively on the development environment. I have found that having the power to bail out to a shell whenever docker compose does not support something helps me iterate faster on my local dev (without affecting others). The following is just a contrived example. Why would I do that? Because I can # Bring up services without a command # # usage: # nocmd.sh up -d service_name function _compose { docker-compose -f docker-compose.yml $@ } function nocmd { cat << EOF services: $1: command: tail -f /dev/null EOF } function nocmd_compose { local service=${@: -1} _compose -f <(nocmd "$service") $@ } nocmd_compose $@
- fio_ini 4y agoI can punch myself in the dick but I don't