Fix: Update docker-compose.yml image URLs to use localhost registry

- Update regex to match both localhost and external registry URLs
- Ensure docker-compose uses localhost:5000 for registry access
- Fixes connection refused errors when docker-compose pulls images
This commit is contained in:
2025-10-31 11:47:38 +01:00
parent ceb86f6d1c
commit 2c2db88ba6

View File

@@ -126,7 +126,8 @@
- name: Update docker-compose.yml with new image tag (all services)
replace:
path: "{{ app_stack_path }}/docker-compose.yml"
regexp: '^(\s+image:\s+){{ app_image }}:.*$'
# Match both localhost:5000 and git.michaelschiemer.de:5000 (or any registry URL)
regexp: '^(\s+image:\s+)(localhost:5000|git\.michaelschiemer\.de:5000|{{ docker_registry }})/{{ app_name }}:.*$'
replace: '\1{{ app_image }}:{{ image_tag }}'
when: image_pull.changed or image_tag != 'latest'
register: compose_updated