Fix: Always update docker-compose.yml to use localhost registry
- Ensure docker-compose.yml always uses localhost:5000 for registry access - Fixes 'no basic auth credentials' error when docker-compose tries to pull images - Registry only accessible via localhost, not external interface
This commit is contained in:
@@ -129,7 +129,8 @@
|
||||
# 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'
|
||||
# Always update to ensure localhost:5000 is used (registry only accessible via localhost)
|
||||
when: true
|
||||
register: compose_updated
|
||||
|
||||
- name: Restart application stack with new image
|
||||
|
||||
Reference in New Issue
Block a user