schon/scripts/Unix/reboot.sh
Egor fureunoir Gorbunov 6b829331c3 Features: 1) Split docker compose build and docker compose up -d into distinct steps with updated messages; 2) Replace custom spinner in Unix script with simplified run_cmd approach;
Fixes: 1) Update final output message to align with application name (`eVibes`);

Extra: 1) Remove redundant spinner implementation in Unix script for clarity and reduction of complexity; 2) General script cleanup and minor formatting tweaks.
2025-06-16 14:35:48 +03:00

35 lines
757 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
run_cmd() {
local msg=$1; shift
printf "%s... " "$msg"
"$@"
printf "OK\n"
}
echo
run_cmd "Stopping services (down)" \
docker compose down
run_cmd "Rebuilding services" \
docker compose build
run_cmd "Starting services" \
docker compose up -d
run_cmd "Applying database migrations" \
docker compose exec app poetry run python manage.py migrate --no-input
run_cmd "Collecting static files" \
docker compose exec app poetry run python manage.py collectstatic --no-input
run_cmd "Setting default caches" \
docker compose exec app poetry run python manage.py set_default_caches
run_cmd "Cleaning up unused Docker data" \
docker system prune -f
echo
echo "All done! eVibes is up and running."