init
This commit is contained in:
commit
d3a7042f61
3 changed files with 28 additions and 0 deletions
3
README.md
Normal file
3
README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# watchtower formula
|
||||
|
||||
Salt formula for deploying watchtower using docker.
|
8
pillar.example
Normal file
8
pillar.example
Normal file
|
@ -0,0 +1,8 @@
|
|||
watchtower:
|
||||
image:
|
||||
path: ghcr.io/containrrr/watchtower
|
||||
version: latest
|
||||
command: "container1 container2"
|
||||
environment:
|
||||
VAR: value
|
||||
VAR2: value
|
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
Reference in a new issue