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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user