From b9f8fb5f81f11568efa85f193277aba54d3a80dd Mon Sep 17 00:00:00 2001 From: Rudolf Date: Fri, 20 Dec 2024 12:07:04 +0100 Subject: [PATCH] Distinguish between envs and local --- ci/templates/docker.sh | 2 +- ci/templates/logs.sh | 2 +- ci/templates/run.sh | 6 +++--- ci/templates/stop.sh | 2 +- ci/templates/wb-manager.sh | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ci/templates/docker.sh b/ci/templates/docker.sh index 76a2827..a1650e9 100644 --- a/ci/templates/docker.sh +++ b/ci/templates/docker.sh @@ -9,5 +9,5 @@ set -o pipefail # catch non-zero exit code in pipes {% if env == "local" %} docker-compose -f {{ pywb_dir }}/docker-compose-{{ env }}.yaml -p pywb-{{ env }} "$@" {% else %} -sudo docker-compose -f {{ pywb_dir }}/docker-compose-{{ env }}.yaml -p pywb-{{ env }} "$@" +sudo docker-compose -f {{ pywb_dir }}/docker-compose.yaml -p pywb-{{ env }} "$@" {% endif %} diff --git a/ci/templates/logs.sh b/ci/templates/logs.sh index c180bcd..9f20b22 100644 --- a/ci/templates/logs.sh +++ b/ci/templates/logs.sh @@ -9,6 +9,6 @@ set -o pipefail # catch non-zero exit code in pipes {% if env == "local" %} docker-compose -f {{ pywb_dir }}/docker-compose-{{ env }}.yaml -p pywb-{{ env }} logs pywb -f {% else %} -sudo docker-compose -f {{ pywb_dir }}/docker-compose-{{ env }}.yaml -p pywb-{{ env }} logs pywb -f +sudo docker-compose -f {{ pywb_dir }}/docker-compose.yaml -p pywb-{{ env }} logs pywb -f {% endif %} diff --git a/ci/templates/run.sh b/ci/templates/run.sh index 98c43dd..23ae6db 100644 --- a/ci/templates/run.sh +++ b/ci/templates/run.sh @@ -12,9 +12,9 @@ docker-compose -f {{ pywb_dir }}/docker-compose-{{ env }}.yaml -p pywb-{{ env }} docker-compose -f {{ pywb_dir }}/docker-compose-{{ env }}.yaml -p pywb-{{ env }} pull docker-compose -f {{ pywb_dir }}/docker-compose-{{ env }}.yaml -p pywb-{{ env }} up -d --remove-orphans {% else %} -sudo docker-compose -f {{ pywb_dir }}/docker-compose-{{ env }}.yaml -p pywb-{{ env }} down -sudo docker-compose -f {{ pywb_dir }}/docker-compose-{{ env }}.yaml -p pywb-{{ env }} pull -sudo docker-compose -f {{ pywb_dir }}/docker-compose-{{ env }}.yaml -p pywb-{{ env }} up -d --remove-orphans +sudo docker-compose -f {{ pywb_dir }}/docker-compose.yaml -p pywb-{{ env }} down +sudo docker-compose -f {{ pywb_dir }}/docker-compose.yaml -p pywb-{{ env }} pull +sudo docker-compose -f {{ pywb_dir }}/docker-compose.yaml -p pywb-{{ env }} up -d --remove-orphans {% endif %} diff --git a/ci/templates/stop.sh b/ci/templates/stop.sh index eae43a6..a477b5a 100644 --- a/ci/templates/stop.sh +++ b/ci/templates/stop.sh @@ -9,7 +9,7 @@ set -o pipefail # catch non-zero exit code in pipes {% if env == "local" %} docker-compose -f {{ pywb_dir }}/docker-compose-{{ env }}.yaml -p pywb-{{ env }} stop {% else %} -sudo docker-compose -f {{ pywb_dir }}/docker-compose-test.yaml -p pywb-test stop +sudo docker-compose -f {{ pywb_dir }}/docker-compose.yaml -p pywb-{{ env }} stop {% endif %} diff --git a/ci/templates/wb-manager.sh b/ci/templates/wb-manager.sh index e38a897..924311b 100644 --- a/ci/templates/wb-manager.sh +++ b/ci/templates/wb-manager.sh @@ -10,5 +10,5 @@ set -o pipefail # catch non-zero exit code in pipes {% if env == "local" %} docker exec -it pywb-local-pywb-1 wb-manager "$@" {% else %} -sudo docker exec -it pywb-local-pywb-1 wb-manager "$@" +sudo docker exec -it pywb-{{ env }}-pywb-1 wb-manager "$@" {% endif %}