schon/scripts/Unix/run.sh
Egor fureunoir Gorbunov 943aa02cd3 Features: 1) Add test cases for DRF and GraphQL views in core, blog, payments, and vibes_auth applications; 2) Implement reusable GraphQL testing utilities in test classes; 3) Introduce test configuration scripts for Windows and Unix environments.
Fixes: 1) Correct entrypoint scripts by removing redundant `python` reference in `uv run` commands; 2) Resolve incorrect imports and adjust class renaming in vibes_auth tests; 3) Address typing errors and minor omissions in existing code.

Extra: 1) Improve formatting in settings and middleware files; 2) Update messaging test class names for clarity; 3) Cleanup unused imports and extra whitespaces, ensuring cleaner codebase.
2025-11-13 16:42:04 +03:00

38 lines
1.2 KiB
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
source ./scripts/Unix/starter.sh
echo "Verifying all images are present..."
if command -v jq >/dev/null 2>&1; then
images=$(docker compose config --format json | jq -r '.services[].image // empty')
if [ -n "$images" ]; then
for image in $images; do
if ! docker image inspect "$image" > /dev/null 2>&1; then
echo "Required images not found. Please run install.sh first." >&2
exit 1
fi
echo " - Found image: $image"
done
fi
else
echo "jq is not installed; skipping image verification step."
fi
echo "Spinning services up..."
docker compose up --no-build --detach --wait
echo "Services are up and healthy!"
echo "Completing pre-run tasks..."
docker compose exec app uv run manage.py migrate --no-input --verbosity 0
docker compose exec app uv run manage.py initialize
docker compose exec app uv run manage.py set_default_caches
docker compose exec app uv run manage.py search_index --rebuild -f
docker compose exec app uv run manage.py collectstatic --clear --no-input --verbosity 0
echo "Pre-run tasks completed successfully!"
echo "Cleaning unused Docker data..."
docker system prune -f
echo "Unused Docker data cleaned successfully!"
echo "All done! eVibes is up and running!"