Init server compose scripts

This commit is contained in:
Joey Hafner 2022-08-06 11:04:37 -07:00
parent aa103af03a
commit 058093de37
2 changed files with 37 additions and 0 deletions

View File

@ -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

View File

@ -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