docker: upgrade Docker Compose to V2

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2024-08-01 19:53:28 +02:00
parent 9372a049c2
commit 5e48c5ec8a
No known key found for this signature in database
GPG Key ID: FE65CD384D5BF7B4
3 changed files with 8 additions and 10 deletions

View File

@ -63,7 +63,7 @@ gitea_container_cleanup_timer_frequency: 'daily'
gitea_container_cleanup_timer_timeout: 120 gitea_container_cleanup_timer_timeout: 120
gitea_cleanup_max_retention: 15 gitea_cleanup_max_retention: 15
# General container management # general container management
compose_recreate: 'smart' compose_recreate: 'auto'
compose_state: 'present' compose_state: 'present'
compose_restart: false compose_pull: 'always'

View File

@ -8,10 +8,9 @@
mode: 0640 mode: 0640
- name: Create containers - name: Create containers
docker_compose: community.docker.docker_compose_v2:
project_src: '{{ gitea_service_path }}' project_src: '{{ gitea_service_path }}'
pull: true recreate: '{{ compose_recreate }}'
state: '{{ compose_state }}' pull: '{{ compose_pull }}'
restarted: '{{ compose_restart }}' recreate: '{{ gitea_config.changed | ternary("always", compose_recreate) }}'
recreate: '{{ gitea_config.changed | ternary("always", compose_recreate) }}'
register: gitea_container register: gitea_container

View File

@ -1,5 +1,4 @@
--- ---
version: '3.7'
services: services:
app: app:
container_name: '{{ gitea_app_cont_name }}' container_name: '{{ gitea_app_cont_name }}'