Alright, but you've sort of re-invented docker compose there, but as a shell script. These days docker compose even work with podman if you really prefer IBM's docker implementation to the original.
I am well aware that docker compose works mostly with Podman. I prefer to use Podamn with systemd over it. I have you even tried giving this a shot? Maybe give using Podman + systemd following my example in Bash instead of Docker + Docker Compose and you will see why?