grammarly / rocker-compose

Docker composition tool with idempotency features for deploying apps composed of multiple containers.
Other
407 stars 26 forks source link

Ability to create volume dirs on the host OS #14

Closed bobef closed 8 years ago

bobef commented 9 years ago

Hi again. I'm in love with rocker compose already. It is a beautiful tool. Thanks!

I need one thing and I'm not sure how to achieve it. When I deploy the apps I need to initialise some directories for the volumes. For example to persist logs and other stuff there. Since this information about what volumes are needed is already in the .yml I want to make a small tool that extracts the volume information and creates empty dirs for me. But I can't because of the templates it is not real .ylm (and I don't use go). I guess creating directories is out of your scope and it will make impossible to run remotely. But maybe you can add the feature to output the rendered YAML after the templates are substituted, maybe optionally as JSON? So I can parse it and create the the directories for the volumes. This way I can deploy automatically without the need for adding the volume information to yet another place.

Regards, Bobi

ybogdanov commented 9 years ago

Great idea, @bobef. What you think is better?

rocker-compose run -print
# or
rocker-compose print

or both?

ybogdanov commented 9 years ago

Also, there is always an option to make a one-off command container, that will create directories for you.

bobef commented 9 years ago

I think print is better. Regards.

bobef commented 9 years ago

I solved this by using a custom template preprocess step and pass the result to rocker-compose. This issue is not relevant to me anymore. FIY I'm using rocker-compose in my just released deployment tool. https://github.com/Perennials/deploy . Regards.

ybogdanov commented 9 years ago

@bobef cool!