Skip to content

Commit

Permalink
Distinguish between envs and local
Browse files Browse the repository at this point in the history
  • Loading branch information
westfood committed Dec 20, 2024
1 parent a7d6191 commit b9f8fb5
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ci/templates/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
2 changes: 1 addition & 1 deletion ci/templates/logs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}

6 changes: 3 additions & 3 deletions ci/templates/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}


Expand Down
2 changes: 1 addition & 1 deletion ci/templates/stop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}


Expand Down
2 changes: 1 addition & 1 deletion ci/templates/wb-manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}

0 comments on commit b9f8fb5

Please sign in to comment.