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.
35 lines
757 B
Bash
Executable file
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."
|