Compare commits
No commits in common. "50b50ad9f8d8ddb8d1603dfbff153c645e8109ab" and "e08b156aecb7bce7bf772f4254fd50c9b198822a" have entirely different histories.
50b50ad9f8
...
e08b156aec
2 changed files with 0 additions and 27 deletions
BIN
.DS_Store
vendored
BIN
.DS_Store
vendored
Binary file not shown.
|
|
@ -1,27 +0,0 @@
|
||||||
printf "%-25s | %-35s | %-10s\n" "ORDNER" "URL" "STATUS"
|
|
||||||
printf "%s\n" "--------------------------------------------------------------------------------"
|
|
||||||
for dir in */; do
|
|
||||||
env_file="${dir}.env"
|
|
||||||
compose_file="${dir}docker-compose.yml"
|
|
||||||
|
|
||||||
if [ -f "$env_file" ] && [ -f "$compose_file" ]; then
|
|
||||||
sub=$(grep '^SUBDOMAIN=' "$env_file" | cut -d'=' -f2-)
|
|
||||||
domain=$(grep '^DOMAIN=' "$env_file" | cut -d'=' -f2-)
|
|
||||||
cname=$(grep '^CONTAINER_NAME=' "$env_file" | cut -d'=' -f2-)
|
|
||||||
|
|
||||||
if [ -n "$sub" ] && [ -n "$domain" ]; then
|
|
||||||
url="${sub}.${domain}"
|
|
||||||
else
|
|
||||||
url="${domain:-N/A}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
status="STOPPED"
|
|
||||||
if [ -n "$cname" ] && [ "$(docker ps -q -f name="^${cname}$")" ]; then
|
|
||||||
status="RUNNING"
|
|
||||||
elif [ "$(docker compose -f "$compose_file" ps --status running -q 2>/dev/null)" ]; then
|
|
||||||
status="RUNNING"
|
|
||||||
fi
|
|
||||||
|
|
||||||
printf "%-25s | https://%-33s | %-10s\n" "${dir%/}" "$url" "$status"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
Loading…
Reference in a new issue