From dd6637260ae978fee70e1ee1623040d5ad15af23 Mon Sep 17 00:00:00 2001 From: c-d-p Date: Wed, 30 Apr 2025 23:13:25 +0200 Subject: [PATCH] added project to compose --- .gitea/workflows/deploy.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index e698b0b..a2322ba 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -125,6 +125,7 @@ jobs: # Define path to compose file WITHIN the checked-out workspace COMPOSE_FILE="${{ gitea.workspace }}/backend/docker-compose.deploy.yml" + PROJECT_NAME="maia" echo "--- Start Deploy Locally (using compose file from repo) ---" echo "Workspace root: ${{ gitea.workspace }}" @@ -145,7 +146,7 @@ jobs: # Pull other images defined in compose using the specific file # Ensures base images like redis/db are up-to-date if specified in compose echo "Pulling other compose services..." - docker compose -f "${COMPOSE_FILE}" pull redis db + docker compose -p "${PROJECT_NAME}" -f "${COMPOSE_FILE}" pull redis db echo "Other service pull complete." # Update the image tag IN THE CHECKED-OUT COMPOSE FILE @@ -158,7 +159,7 @@ jobs: # Restart the services using the updated compose file from the workspace # Docker compose interacts with the HOST daemon via the mounted socket echo "Bringing compose stack down and up with new image..." - docker compose -f "${COMPOSE_FILE}" up -d --force-recreate --remove-orphans + docker compose -p "${PROJECT_NAME}" -f "${COMPOSE_FILE}" up -d --force-recreate --remove-orphans echo "Docker compose up command finished." echo "--- Local deployment complete! ---"