28 lines
733 B
YAML
28 lines
733 B
YAML
|
---
|
||
|
# Portainer (Docker container management GUI)
|
||
|
- name: Create Portainer volume
|
||
|
community.docker.docker_volume:
|
||
|
name: portainer-data
|
||
|
|
||
|
- name: Deploy Portainer
|
||
|
community.docker.docker_container:
|
||
|
name: portainer
|
||
|
image: docker.io/portainer/portainer-ce
|
||
|
ports:
|
||
|
- "8000:8000"
|
||
|
- "9443:9443"
|
||
|
volumes:
|
||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||
|
- portainer-data:/data
|
||
|
restart_policy: always
|
||
|
|
||
|
# Watchtower (Docker container updater)
|
||
|
- name: Deploy Watchtower
|
||
|
community.docker.docker_container:
|
||
|
name: watchtower
|
||
|
image: containrrr/watchtower
|
||
|
command: --schedule "0 0 4 * * *" --debug
|
||
|
volumes:
|
||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||
|
restart_policy: always
|