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

Research: what would a docker container of this look like? #129

Open
simonw opened this issue Jun 11, 2021 · 2 comments
Open

Research: what would a docker container of this look like? #129

simonw opened this issue Jun 11, 2021 · 2 comments
Labels

Comments

@simonw
Copy link
Owner

simonw commented Jun 11, 2021

This has made me think that maybe a cool ability would be if you could run a pre-compiled Django SQL Dashboard in its own Docker container and point it at an existing PostgreSQL database via an environment variable...

Originally posted by @simonw in #128 (comment)

@simonw
Copy link
Owner Author

simonw commented Jun 11, 2021

Imagine if you could run Django SQL Dashboard in a self-contained Docker container and point it at a PostgreSQL database:

docker run -p 8000:8000 \
  -e DASHBOARD_DATABASE="postgres://...." \
  django-sql-dashboard

There are a few challenges with this:

  • How would user authentication work?
  • How would saved dashboards work? Those need a database connection they can save data to, plus they need their supporting tables created

One possible solution: pass in two environment variables - one for the dashboard database (PostgreSQL only, at least until #49) and one for the authentication and saved dashboards database (any supported Django connection string) - the latter option could even work with a SQLite file mounted in a container volume.

@simonw
Copy link
Owner Author

simonw commented Jun 11, 2021

Could also handle authentication using a single-use login token similar to "datasette --root"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant