diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..e74ed48 --- /dev/null +++ b/start.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +terminate_script() { + echo "Stopping the script and killing background processes..." + + docker compose down + + # Kill all child processes (background processes) + pkill -P $$ # $$ refers to the PID of the script itself + + exit 1 +} + +trap 'terminate_script' INT TERM HUP + +# Start the first process +$(docker compose up -d) + + +# Start the second process +$(cargo dev) + +