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_cleanup_max_retention: 15
# General container management
compose_recreate: 'smart'
# general container management
compose_recreate: 'auto'
compose_state: 'present'
compose_restart: false
compose_pull: 'always'

View File

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

View File

@ -1,5 +1,4 @@
---
version: '3.7'
services:
app:
container_name: '{{ gitea_app_cont_name }}'
@ -14,7 +13,7 @@ services:
- '{{ gitea_app_cont_ssh_port }}:22/tcp'
depends_on:
- db
db:
container_name: '{{ gitea_db_cont_name }}'
image: '{{ gitea_db_cont_image }}'