docker: migrate to Docker Compose V2

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2024-10-15 21:37:22 +02:00
parent fb63c16eb2
commit 19d63d6daa
No known key found for this signature in database
GPG Key ID: FE65CD384D5BF7B4
2 changed files with 7 additions and 9 deletions

View File

@ -81,7 +81,7 @@ alertmanager_victorops_display_name: >-
# For discovery of prometheus master nodes # For discovery of prometheus master nodes
consul_catalog_url: 'http://localhost:8500/v1/catalog' consul_catalog_url: 'http://localhost:8500/v1/catalog'
# Generic container options # general container management
compose_recreate: 'smart' compose_recreate: 'auto'
compose_state: 'present' compose_state: 'present'
compose_restart: false compose_pull: 'always'

View File

@ -28,11 +28,9 @@
oauth_upstream_url: 'http://app:{{ alertmanager_webui_port }}/' oauth_upstream_url: 'http://app:{{ alertmanager_webui_port }}/'
- name: Create containers - name: Create containers
docker_compose: community.docker.docker_compose_v2:
project_src: '{{ alertmanager_service_path }}' project_src: '{{ alertmanager_service_path }}'
files: ['{{ alertmanager_compose_file }}', '{{ alertmanager_oauth_compose_file }}'] files: ['{{ alertmanager_compose_file }}', '{{ alertmanager_oauth_compose_file }}']
pull: true recreate: '{{ compose_recreate }}'
build: false pull: '{{ compose_pull }}'
state: '{{ compose_state }}' state: '{{ "restarted" if alertmanager_config.changed else compose_state }}'
restarted: '{{ compose_restart }}'
recreate: '{{ alertmanager_config.changed | ternary("always", compose_recreate) }}'