Last active
February 28, 2022 18:17
-
-
Save Krazybug/c1bc4bc49e2a34d06279e60054cdab6b to your computer and use it in GitHub Desktop.
Revisions
-
Krazybug revised this gist
May 9, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ You need a recent installation of python (3.x) 1. Install poetry, datasette and its plugins ``` poetry new calishot -
Krazybug revised this gist
May 9, 2020 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ # CALISHOT deployment instructions You need a recent installation of python (3.x) 1. Install poetry, datasette and it's plugins -
Krazybug created this gist
May 8, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,69 @@ # CALISHOT Deployment instructions You need an recent instatllation of python (3.x) 1. Install poetry, datasette and it's plugins ``` poetry new calishot poetry shell poetry add datasette poetry add datasette-json-html poetry add datasette-pretty-json ``` You can eventually install it with virtualenv/pip if you don't want to use poetry: ``` python -m venv calishot . ./calishot/bin/activate pip install datasette pip install datasette-json-html pip install datasette-pretty-json ```` 2. Prepare the calishot settings: Download the sqlite db file to the same directory and then ``` cat <<EOF > metadata.json { "databases": { "index": { "tables": { "summary": { "sort": "title", "searchmode": "raw" } } } } } EOF ``` You can now run a local test: ``` datasette serve index.db --config sql_time_limit_ms:10000 --config allow_download:off --config max_returned_rows:2000 --config num_sql_threads:10 --metadata met adata.json ```` Open your browser to http://localhost:8001/ and check the result. 3. Now you're ready to publish :) Install [heroku-cli](https://devcenter.heroku.com/articles/heroku-cli) then : ``` heroku login datasette publish heroku index.db -n calishot-3 --install=datasette-json-html --install=datasette-pretty-json --extra-options="--config sql_time_limit_ms:10000 - -config allow_download:off --config num_sql_threads:10 --config max_returned_rows:500" --metadata metadata.json ``` ## Tadaaaaaa !