Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalize viewer database configuration #102

Merged
merged 1 commit into from
Sep 9, 2024
Merged

Conversation

chosak
Copy link
Member

@chosak chosak commented Sep 9, 2024

This commit generalizes the database configuration used by the Django viewer application. Instead of assuming a SQLite database file, this commit alters the project settings to use dj-database-url instead, which supports various database backends.

The DATABASE_URL parameter must now specify a dj-database-url configuration string instead of a SQLite file path.

Because the viewer backend now supports any database, the ability to download the raw SQLite database file has been removed from the frontend. Deployments that use SQLite as the database storage can provide alternate ways of exposing that file if needed.

The crawler application still deliberately writes to a SQLite file; a subsequent PR will consolidate this with the viewer database backend by supporting storage of multiple crawls.

The project README has been rewritten to better document how to run the crawler using both a Python virtual environment or Docker.

This commit generalizes the database configuration used by the Django
viewer application. Instead of assuming a SQLite database file, this
commit alters the project settings to use dj-database-url [0]
instead, which supports various database backends.

The DATABASE_URL parameter must now specify a dj-database-url
configuration string instead of a SQLite file path.

Because the viewer backend now supports any database, the ability to
download the raw SQLite database file has been removed from the
frontend. Deployments that use SQLite as the database storage can
provide alternate ways of exposing that file if needed.

The crawler application still deliberately writes to a SQLite file; a
subsequent PR will consolidate this with the viewer database backend
by supporting storage of multiple crawls.

The project README has been rewritten to better document how to run
the crawler using both a Python virtual environment or Docker.

[0] https://github.com/jazzband/dj-database-url
Copy link
Member

@willbarton willbarton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good on a read-through! Seems a theoretical shame to lose the db size and direct download, but I think I've only used the direct download once, myself.

@chosak chosak merged commit ba4b5d0 into main Sep 9, 2024
3 checks passed
@chosak chosak deleted the feature/generalize-db branch September 9, 2024 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants