Add watchtower to manage auto-update of containers
This commit is contained in:
parent
0c1e94323c
commit
9ff11808ce
|
@ -23,6 +23,7 @@
|
||||||
- docker_registry
|
- docker_registry
|
||||||
- drone
|
- drone
|
||||||
- websites
|
- websites
|
||||||
|
- watchtower
|
||||||
|
|
||||||
smtp_host: postfix
|
smtp_host: postfix
|
||||||
smtp_port: 587
|
smtp_port: 587
|
||||||
|
|
12
roles/docker/tasks/services/watchtower.yml
Normal file
12
roles/docker/tasks/services/watchtower.yml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
---
|
||||||
|
- name: watchtower container
|
||||||
|
docker_container:
|
||||||
|
name: watchtower
|
||||||
|
image: v2tec/watchtower
|
||||||
|
restart_policy: unless-stopped
|
||||||
|
networks:
|
||||||
|
- name: external_services
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
- /root/.docker/config.json:/config.json
|
||||||
|
command: ["--label-enable"]
|
|
@ -11,6 +11,8 @@
|
||||||
VIRTUAL_HOST : "{{ data_coop_website.domain }}"
|
VIRTUAL_HOST : "{{ data_coop_website.domain }}"
|
||||||
LETSENCRYPT_HOST: "{{ data_coop_website.domain }}"
|
LETSENCRYPT_HOST: "{{ data_coop_website.domain }}"
|
||||||
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
|
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
|
||||||
|
labels:
|
||||||
|
com.centurylinklabs.watchtower.enable: "true"
|
||||||
|
|
||||||
- name: setup cryptohagen.dk website docker container
|
- name: setup cryptohagen.dk website docker container
|
||||||
docker_container:
|
docker_container:
|
||||||
|
@ -23,3 +25,5 @@
|
||||||
VIRTUAL_HOST : "{{ cryptohagen_website.domain }}"
|
VIRTUAL_HOST : "{{ cryptohagen_website.domain }}"
|
||||||
LETSENCRYPT_HOST: "{{ cryptohagen_website.domain }}"
|
LETSENCRYPT_HOST: "{{ cryptohagen_website.domain }}"
|
||||||
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
|
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
|
||||||
|
labels:
|
||||||
|
com.centurylinklabs.watchtower.enable: "true"
|
||||||
|
|
Loading…
Reference in a new issue