45 lines
1.4 KiB
Bash
Executable file
45 lines
1.4 KiB
Bash
Executable file
#!/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/ugc_content_creators" || true
|
|
pkill -f "target/debug/employees" || true
|
|
|
|
apps=(
|
|
"gateway" "users" "companies" "job_seekers" "customers"
|
|
"photographers" "makeup_artists" "tutors" "developers" "video_editors"
|
|
"graphic_designers" "social_media_managers" "fitness_trainers" "catering_services"
|
|
"ugc_content_creators" "employees"
|
|
)
|
|
|
|
for app in "${apps[@]}"; do
|
|
if [[ -x "./target/debug/$app" ]]; then
|
|
echo "Starting $app..."
|
|
nohup ./target/debug/$app > "$app.log" 2>&1 &
|
|
else
|
|
echo "Skipping $app (binary not found at ./target/debug/$app)"
|
|
fi
|
|
done
|
|
|
|
echo "All available services booted up!"
|