Fix: Always restart stack on deployment to ensure code changes apply

- Remove condition that skipped restart when image already exists
- Ensures container restart even when using same image tag (latest)
- Critical for applying code fixes without rebuilding image
This commit is contained in:
2025-10-31 11:50:09 +01:00
parent 2c2db88ba6
commit 252a6d9b38

View File

@@ -140,7 +140,9 @@
recreate: always recreate: always
remove_orphans: yes remove_orphans: yes
register: stack_deploy register: stack_deploy
when: image_pull.changed or compose_updated.changed # Always restart when deploying, even if image already exists
# This ensures code changes are applied even with same image tag
when: true
- name: Wait for services to be healthy - name: Wait for services to be healthy
wait_for: wait_for: