From 48e5179bac448acc9770d07c988350e6223aa8b6 Mon Sep 17 00:00:00 2001 From: Michael Schiemer Date: Sat, 8 Nov 2025 15:35:50 +0100 Subject: [PATCH] fix: Correct deployment order - deploy image before composer install - Move deploy-image.yml before install-composer-dependencies.yml - Containers must be running before composer can install dependencies - Fixes 'container not running' error in composer install step - Applied to both staging and production workflows --- .gitea/workflows/build-image.yml | 36 ++++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.gitea/workflows/build-image.yml b/.gitea/workflows/build-image.yml index ddfff596..5ff44dbf 100644 --- a/.gitea/workflows/build-image.yml +++ b/.gitea/workflows/build-image.yml @@ -986,15 +986,6 @@ jobs: --vault-password-file /tmp/vault_pass \ --private-key ~/.ssh/production - - name: Install Composer Dependencies - run: | - cd /workspace/repo/deployment/ansible - ansible-playbook -i inventory/production.yml \ - playbooks/install-composer-dependencies.yml \ - -e "deployment_environment=staging" \ - --vault-password-file /tmp/vault_pass \ - --private-key ~/.ssh/production - - name: Deploy Docker Image to Staging run: | cd /workspace/repo/deployment/ansible @@ -1009,6 +1000,15 @@ jobs: --vault-password-file /tmp/vault_pass \ --private-key ~/.ssh/production + - name: Install Composer Dependencies + run: | + cd /workspace/repo/deployment/ansible + ansible-playbook -i inventory/production.yml \ + playbooks/install-composer-dependencies.yml \ + -e "deployment_environment=staging" \ + --vault-password-file /tmp/vault_pass \ + --private-key ~/.ssh/production + - name: Wait for deployment to stabilize run: sleep 30 @@ -1158,15 +1158,6 @@ jobs: --vault-password-file /tmp/vault_pass \ --private-key ~/.ssh/production - - name: Install Composer Dependencies - run: | - cd /workspace/repo/deployment/ansible - ansible-playbook -i inventory/production.yml \ - playbooks/install-composer-dependencies.yml \ - -e "deployment_environment=production" \ - --vault-password-file /tmp/vault_pass \ - --private-key ~/.ssh/production - - name: Deploy Docker Image to Production run: | cd /workspace/repo/deployment/ansible @@ -1181,6 +1172,15 @@ jobs: --vault-password-file /tmp/vault_pass \ --private-key ~/.ssh/production + - name: Install Composer Dependencies + run: | + cd /workspace/repo/deployment/ansible + ansible-playbook -i inventory/production.yml \ + playbooks/install-composer-dependencies.yml \ + -e "deployment_environment=production" \ + --vault-password-file /tmp/vault_pass \ + --private-key ~/.ssh/production + - name: Wait for deployment to stabilize run: sleep 30