init
This commit is contained in:
commit
d3a7042f61
3 changed files with 28 additions and 0 deletions
17
watchtower/init.sls
Normal file
17
watchtower/init.sls
Normal file
|
@ -0,0 +1,17 @@
|
|||
watchtower docker conatiner running:
|
||||
docker_container.running:
|
||||
- name: watchtower
|
||||
- image: {{ salt['pillar.get']('watchtower:image:path', 'ghcr.io/containrrr/watchtower') }}:{{ salt['pillar.get']('watchtower:image:version', 'latest') }}
|
||||
- container_name: watchtower
|
||||
- command: {{ salt['pillar.get']('watchtower:command', '') }}
|
||||
{% if pillar['watchtower']['environment'] %}
|
||||
- environment:
|
||||
{% for key, value in pillar.get('watchtower:environment', {}).items() %}
|
||||
- {{key}}={{value}}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
- binds:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
- restart: always
|
||||
- networks:
|
||||
- bridge
|
Loading…
Add table
Add a link
Reference in a new issue