diff --git a/start-services.sh b/start-services.sh new file mode 100755 index 0000000..bc48195 --- /dev/null +++ b/start-services.sh @@ -0,0 +1,39 @@ +#!/bin/bash +set -e + +set -a +source .env +set +a + +echo "Building workspace..." +cargo build --workspace + +echo "Stopping any previously running services..." +pkill -f "target/debug/gateway" || true +pkill -f "target/debug/users" || true +pkill -f "target/debug/companies" || true +pkill -f "target/debug/job_seekers" || true +pkill -f "target/debug/customers" || true +pkill -f "target/debug/photographers" || true +pkill -f "target/debug/makeup_artists" || true +pkill -f "target/debug/tutors" || true +pkill -f "target/debug/developers" || true +pkill -f "target/debug/video_editors" || true +pkill -f "target/debug/graphic_designers" || true +pkill -f "target/debug/social_media_managers" || true +pkill -f "target/debug/fitness_trainers" || true +pkill -f "target/debug/catering_services" || true +pkill -f "target/debug/payments" || true + +apps=( + "gateway" "users" "companies" "job_seekers" "customers" + "photographers" "makeup_artists" "tutors" "developers" "video_editors" + "graphic_designers" "social_media_managers" "fitness_trainers" "catering_services" "payments" +) + +for app in "${apps[@]}"; do + echo "Starting $app..." + ./target/debug/$app > "$app.log" 2>&1 & +done + +echo "All services booted up!"