Serve all db files in a folder
See original GitHub issueI tried to get the serve
command to serve all the .db files in the /mnt
folder but is seems that the server does not refresh the list of files.
In more detail:
- Starting datasette as a docker container with:
docker run -p 8001:8001 -v `pwd`:/mnt \
datasetteproject/datasette \
datasette -p 8001 -h 0.0.0.0 /mnt
- Datasette correctly serves all the *.db files found in the /mnt folder
- When the server is running, if I copy a new file in the $PWD folder, Datasette does not seem to see the new files, forcing me to restart Docker.
Is there an option/setting that I overlooked, or is this something missing?
BTW, the --reload
setting, although at first glance is what you think you need, does not seem to do anything in regards of seeing all *.db files.
Thanks!
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Run all SQL files in a directory
open the folder in Explorer · select all script files · press Shift · right click the selection and select "Copy as path"...
Read more >Database Files and Filegroups - SQL Server
Learn about database files and how to create filegroups in SQL Server for allocation and administrative purposes. View examples, rules, and ...
Read more >How to move the system database files in SQL Server - YouTube
Sometimes installation defaults are missed, or storage is added, and you need to move the system database files to a new location.
Read more >Change default database file and backup paths in SQL ...
Let us go to the default path (/var/opt/mssql/data). Here we can view the content using the 'ls -lrt' command. You can find all...
Read more >SQL SERVER - Find Current Location of Data and Log File of ...
I often go to that folder and clean up all unnecessary files I have ... do documentation of which files are in being...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@glasnt yeah I guess that could be an option. I run datasette on large databases > 75gb and the startup time is a bit slow for me even with -i --inspect-file options. Here’s a quick sketch for a plugin that will reload db’s in a folder that you set for the plugin in metadata.json. If you request /-reload-db new db’s will be added. (You probably want to implement some authentication for this =) )
https://gist.github.com/Segerberg/b96a0e0a5389dce2396497323cda7042
Would it make sense to run datasette with a fswatch/inotifywait on a folder, then?