lab-ansible/roles/proxy/templates/scripts/deploy.sh.j2

22 lines
428 B
Plaintext
Raw Normal View History

2023-11-13 20:17:17 +00:00
#!/usr/bin/env bash
# code: language=bash
ARG="$1"
PROXY_DIR="{{ proxy_data_root }}/{{ proxy_mode }}"
case $ARG in
start)
docker compose -f $PROXY_DIR/docker-compose.yml up --remove-orphans -d
;;
stop)
docker compose -f $PROXY_DIR/docker-compose.yml down --remove-orphans
;;
restart)
docker compose -f $PROXY_DIR/docker-compose.yml restart
;;
*)
echo "Unrecognized argument"
exit 1
;;
esac