tuning ui and adding adaptive themeing to extension

This commit is contained in:
Bryan Van Deusen
2026-01-25 18:47:06 -05:00
parent dc6755a0c2
commit 997f31ae27
23 changed files with 978 additions and 114 deletions
+41
View File
@@ -0,0 +1,41 @@
#!/bin/bash
set -e
# Fix ownership of data directories (needed for bind mounts)
# Only fix top-level dirs to avoid slow recursive chown on large downloads
echo "Fixing data directory permissions..."
chown appuser:appuser /data /data/downloads /data/config /data/cookies 2>/dev/null || true
# Wait for database to be ready
echo "Waiting for database..."
until gosu appuser python -c "
import asyncio
from sqlalchemy.ext.asyncio import create_async_engine
from app.config import get_settings
async def check():
settings = get_settings()
engine = create_async_engine(settings.async_database_url)
async with engine.connect() as conn:
await conn.execute(__import__('sqlalchemy').text('SELECT 1'))
await engine.dispose()
asyncio.run(check())
" 2>/dev/null; do
echo "Database not ready, waiting..."
sleep 2
done
echo "Database is ready!"
# Only run migrations from the app container (not celery worker)
# This prevents race conditions when multiple containers start simultaneously
if [[ "$1" == "hypercorn" ]]; then
echo "Running database migrations..."
gosu appuser alembic upgrade head
echo "Migrations complete!"
else
echo "Skipping migrations (will be run by app container)"
fi
# Start the application as non-root user
exec gosu appuser "$@"