diff --git a/server/scripts/compose_down.sh b/server/scripts/compose_down.sh new file mode 100644 index 0000000..a392125 --- /dev/null +++ b/server/scripts/compose_down.sh @@ -0,0 +1,19 @@ +#!/bin/bash +echo "===========================================" +echo "===== SHUTTING DOWN MINECRAFT SERVERS =====" +echo "===========================================" +for service in /home/joey/homelab/server/config/minecraft/*.yml; do echo "===== SHUTTING DOWN $service =====" && docker-compose -f $service down; done + +echo "===========================================" +echo "======= SHUTTING DOWN OTHER SERVERS =======" +echo "===========================================" + +for service in /home/joey/homelab/server/config/*; do echo "===== SHUTTING DOWN $service =====" && cd $service && docker-compose down; done + +echo "===========================================" +echo "================ ALL DONE =================" +echo "===== Clean up any running containers =====" +echo "===========================================" + +echo "docker ps -a" +docker ps -a \ No newline at end of file diff --git a/server/scripts/compose_up.sh b/server/scripts/compose_up.sh new file mode 100644 index 0000000..5f99289 --- /dev/null +++ b/server/scripts/compose_up.sh @@ -0,0 +1,18 @@ +#!/bin/bash +echo "===========================================" +echo "========== STARTING MAIN SERVERS ==========" +echo "===========================================" +for service in /home/joey/homelab/server/config/*; do echo "===== STARTING $service =====" && cd $service && docker-compose up -d; done + +echo "===========================================" +echo "======== STARTING MINECRAFT SERVERS =======" +echo "===========================================" +for service in /home/joey/homelab/server/config/minecraft/*.yml; do echo "===== STARTING $service =====" && docker-compose -f $service up -d; done + +echo "===========================================" +echo "================ ALL DONE =================" +echo "======= List all running containers =======" +echo "===========================================" + +echo "docker ps -a" +docker ps -a \ No newline at end of file