Fix environment variable exports in start-services

This commit is contained in:
Ashwin Kumar 2026-03-26 00:36:14 +01:00
parent 0be46d328a
commit a7a0854a5b

39
start-services.sh Executable file
View file

@ -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!"