# BookWyrm — Notes ## SCSS themes must be compiled before collectstatic BookWyrm ships SCSS source files instead of pre-compiled CSS. The static root is an `emptyDir` (ephemeral), so it is empty on every pod restart. Running `collectstatic` alone fails: ``` ValueError: Missing staticfiles manifest entry for 'css/themes/...' ``` **Fix**: compile themes before collecting static files: ```yaml command: ["/bin/sh", "-c"] args: - | python manage.py compile_themes \ && python manage.py collectstatic --noinput \ && python manage.py migrate \ && exec gunicorn bookwyrm.wsgi:application ... ``` Check the image's `Dockerfile` or `docker_start.sh` to confirm the current required build steps. ## PostgreSQL extensions require superuser BookWyrm uses extensions (`bloom`, `pg_trgm`, etc.) that require superuser to install. Migrations fail with `permission denied to create extension "bloom"` if the app DB user is not a superuser. **Fix**: create the extensions in the `db-init-job`, which connects as the `postgres` superuser: ```bash psql -d "$APP_DB_NAME" -c "CREATE EXTENSION IF NOT EXISTS bloom;" psql -d "$APP_DB_NAME" -c "CREATE EXTENSION IF NOT EXISTS pg_trgm;" ``` This must run before migrations (i.e. in `db-init-job`, not in the app startup command).