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:
2025-10-31 11:50:47 +01:00
parent 252a6d9b38
commit 4c76f54389

View File

@@ -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