4 ms·
Surprised it didn't mention profiles, which let you launch only part of your "stack" (think background processing in addition to web app, etc) https://docs.doc
by bdcravens 4y ago
Surprised it didn't mention profiles, which let you launch only part of your "stack" (think background processing in addition to web app, etc)
https://docs.docker.com/compose/profiles/ https://docs.docker.com/compose/profiles/
Prior to that feature, I had a hand-rolled approach using bash scripts and using overrides. Worked well enough, but felt like a dirty dependency.
- Cyph0n 4y agoWow, this is a pretty cool feature. Looks similar to Ansible tags.
- xwowsersx 4y agoWow, did not know about this. Thanks for the tip.
- _joel 4y agoNeat, this would have saved some headaches in the past (about 2018). Was it a feature then? If so I wasted some time reinventing the wheel, it seems!
- Ajedi32 4y agoOne thing I really like about profiles is that they get activated implicitly if you reference one of their services when running docker compose. So you can define development, debugging, or maintenance tools in your compose file and just run them with `docker compose run some-random-tool` without having to worry about them interfering with the standard `docker compose up` workflow.
- aqibgatoo 4y agoWohoo! Pretty neat, i have been making multiple docker compose files.
- lucasyvas 4y agoI just wasted so much duplication effort in a new monorepo by not knowing about this feature - know what my next commit will be I guess!