Browse Source

Extend logspout

master
Sean Johnson 4 years ago
parent
commit
9481b15a1e
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG Key ID: 9FA15B87469EA850
  1. 2
      app/logspout/defaults.yaml
  2. 14
      app/logspout/init.sls

2
app/logspout/defaults.yaml

@ -6,3 +6,5 @@ container:
name: logspout
env: {}
restart: always
mounts: []
publish: []

14
app/logspout/init.sls

@ -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 %}

Loading…
Cancel
Save