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

24 lines
460 B
Plaintext
Raw Normal View History

# THIS FILE IS MANAGED BY ANSIBLE
# vim: ft=bash
2023-11-13 20:17:17 +00:00
# code: language=bash
#!/usr/bin/env bash
2023-11-13 20:17:17 +00:00
ARG="$1"
2023-12-22 20:57:19 +00:00
PROXY_DIR="{{ proxy_data_root }}"
2023-11-13 20:17:17 +00:00
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