ansible-role-docker-compose-generator icon indicating copy to clipboard operation
ansible-role-docker-compose-generator copied to clipboard

Add support for local docker volumes

Open itsmegb opened this issue 2 years ago • 2 comments

This PR adds support for including local docker volumes in the docker compose file.

I've also updated the readme to include an example implementation.

itsmegb avatar Jul 21 '22 06:07 itsmegb

I've just got around to fixing this PR, there was a stupid typo in one of the tags that caused the template generation to fail.

itsmegb avatar Jun 28 '23 07:06 itsmegb

Hi @itsmegb,

Thanks for this PR. For my use case I modified your template to add name: {{volume.name}} to ensure that the volume was named as I described. I was wondering if you considered naming the volumes? Would this be a change you would be willing to add to the PR?

{% for volume in docker_volumes %}
    {{ volume.name }}:
        name: {{ volume.name }}
    {% if volume.external is defined %}
        external: {{ volume.external }}
    {% endif %}
{% endfor %}

jasonlearst avatar Oct 28 '23 16:10 jasonlearst

sorry i let this go stale. needs a rebase now i think.

ironicbadger avatar Mar 16 '24 03:03 ironicbadger