|
|
|
@ -13,9 +13,23 @@ run logspout container:
|
|
|
|
|
- name: {{ container.name | yaml_squote }} |
|
|
|
|
- detach: true |
|
|
|
|
- restart_policy: {{ container.restart | yaml_squote }} |
|
|
|
|
{%- if container.args %} |
|
|
|
|
- command: {{ container.args | yaml_squote }} |
|
|
|
|
{%- else %} |
|
|
|
|
{{ raise("logspout:container:args is undefined") }} |
|
|
|
|
{%- endif %} |
|
|
|
|
- environment: |
|
|
|
|
{%- for key, value in container.env.items() %} |
|
|
|
|
- {{ key }}: {{ value | yaml_squote }} |
|
|
|
|
{%- endfor %} |
|
|
|
|
- binds: |
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro |
|
|
|
|
{%- for mount in container.mounts | default([]) %} |
|
|
|
|
- {{ mount }} |
|
|
|
|
{%- endfor %} |
|
|
|
|
{%- if container.publish %} |
|
|
|
|
- port_bindings: |
|
|
|
|
{%- for port_bind in container.publish %} |
|
|
|
|
- {{ port_bind | yaml_squote }} |
|
|
|
|
{%- endfor %} |
|
|
|
|
{%- endif %} |
|
|
|
|