1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- #!/bin/bash
- if [ -f /opt/docker/startup/conf/$HOSTNAME ]; then echo "OK: Container list found"; else echo "NOK: No container list found" && exit 1; fi
- source /opt/docker/startup/conf/$HOSTNAME
- up() {
- for service in $services
- do
- cd $service
- docker compose up -d
- # docker compose down
- # docker network prune
- # docker compose pull
- # docker compose up -d
- done
- }
- down() {
- for service in $services
- do
- cd $service
- docker compose down
- done
- }
- pull() {
- for service in $services
- do
- cd $service
- docker compose pull
- done
- }
- case "$1" in
- up)
- up
- ;;
-
- down)
- down
- ;;
-
- pull)
- pull
- ;;
-
- *)
- echo $"Usage: $0 {up|down|pull}"
- exit 1
- esac
|