New script to validate compose file validity
This commit is contained in:
parent
8ddfd0cc48
commit
be854aa304
30
server/scripts/compose_config.sh
Normal file
30
server/scripts/compose_config.sh
Normal file
@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
FAIL=""
|
||||
PASS=""
|
||||
|
||||
echo "=============================="
|
||||
echo "========== STARTING =========="
|
||||
echo "=============================="
|
||||
for servicedir in /home/joey/homelab/server/config/*
|
||||
do
|
||||
service="$(basename $servicedir)"
|
||||
echo "===== CHECKING $service"
|
||||
cd $servicedir
|
||||
{
|
||||
docker-compose config > /dev/null 2>&1 &&
|
||||
PASS+="$service\n"
|
||||
} || {
|
||||
FAIL+="$service\n"
|
||||
}
|
||||
done
|
||||
|
||||
echo "=============================="
|
||||
echo "========== ALL DONE =========="
|
||||
echo "=============================="
|
||||
|
||||
echo "========== PASSED ============"
|
||||
echo -e "$PASS"
|
||||
|
||||
echo "========== FAILED ============"
|
||||
echo -e "$FAIL"
|
Loading…
Reference in New Issue
Block a user