mirror of
https://github.com/kjanat/livegraphs-django.git
synced 2026-02-13 18:55:42 +01:00
- build(pre-commit): upgrade hooks (django-upgrade 1.29.1, uv 0.9.7, ruff 0.14.3, bandit 1.8.6) - build(pre-commit): add uv-lock hook, tombi TOML formatter, prettier-plugin-packagejson - build(pre-commit): disable Django check hooks (commented out) - build(pre-commit): switch npx → bunx for prettier execution - build(node): add bun.lock, update prettier config with schema + packagejson plugin - style: apply ruff format to all Python files (comments, spacing, imports) - style: apply prettier format to all JS/CSS files (comment styles, spacing) - style: apply tombi format to pyproject.toml (reordered sections, consistent formatting) - chore: remove emoji from bash script comments for consistency BREAKING CHANGE: Django check and migration check hooks disabled in pre-commit config
43 lines
1.2 KiB
Bash
Executable File
43 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Set UV_LINK_MODE to copy to avoid hardlink warnings
|
|
|
|
export UV_LINK_MODE=copy
|
|
|
|
# Check if Redis is running
|
|
|
|
if ! redis-cli ping >/dev/null 2>&1; then
|
|
echo "Starting Redis server..."
|
|
redis-server --daemonize yes
|
|
sleep 1
|
|
|
|
# Verify Redis is now running
|
|
|
|
if redis-cli ping >/dev/null 2>&1; then
|
|
echo "✅ Redis server is now running"
|
|
else
|
|
echo "❌ Failed to start Redis server"
|
|
echo "Falling back to SQLite for Celery"
|
|
export CELERY_BROKER_URL=sqla+sqlite:///dashboard_project/celery.sqlite
|
|
export CELERY_RESULT_BACKEND=db+sqlite:///dashboard_project/results.sqlite
|
|
fi
|
|
else
|
|
echo "✅ Redis server is already running"
|
|
fi
|
|
|
|
# Set environment variables for Redis if it's running
|
|
|
|
if redis-cli ping >/dev/null 2>&1; then
|
|
export CELERY_BROKER_URL=redis://localhost:6379/0
|
|
export CELERY_RESULT_BACKEND=redis://localhost:6379/0
|
|
echo "Using Redis for Celery broker and result backend"
|
|
else
|
|
export CELERY_BROKER_URL=sqla+sqlite:///dashboard_project/celery.sqlite
|
|
export CELERY_RESULT_BACKEND=db+sqlite:///dashboard_project/results.sqlite
|
|
echo "Using SQLite for Celery broker and result backend"
|
|
fi
|
|
|
|
# Start the application using foreman
|
|
|
|
foreman start
|