Added Heroku to README, updated --help output examples

Refs #157
pull/178/head
Simon Willison 2017-12-09 10:50:08 -08:00 zatwierdzone przez GitHub
rodzic 06645f2e26
commit 6bdfcf6076
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 42 dodań i 27 usunięć

Wyświetl plik

@ -103,11 +103,14 @@ http://localhost:8001/History/downloads.jsono will return that data as JSON in a
--max_returned_rows INTEGER Max allowed rows to return at once - default is --max_returned_rows INTEGER Max allowed rows to return at once - default is
1000. Set to 0 to disable check entirely. 1000. Set to 0 to disable check entirely.
--sql_time_limit_ms INTEGER Max time allowed for SQL queries in ms --sql_time_limit_ms INTEGER Max time allowed for SQL queries in ms
--load-extension TEXT Path to a SQLite extension to load --load-extension PATH Path to a SQLite extension to load
--inspect-file TEXT Path to JSON file created using "datasette --inspect-file TEXT Path to JSON file created using "datasette
inspect" inspect"
-m, --metadata FILENAME Path to JSON file containing license/source -m, --metadata FILENAME Path to JSON file containing license/source
metadata metadata
--template-dir DIRECTORY Path to directory containing custom templates
--static STATIC MOUNT mountpoint:path-to-directory for serving static
files
--help Show this message and exit. --help Show this message and exit.
## metadata.json ## metadata.json
@ -126,11 +129,15 @@ The license and source information will be displayed on the index page and in th
## datasette publish ## datasette publish
If you have [Zeit Now](https://zeit.co/now) installed, datasette can deploy one or more SQLite databases to the internet with a single command: If you have [Zeit Now](https://zeit.co/now) or [Heroku](https://heroku.com/) configured, datasette can deploy one or more SQLite databases to the internet with a single command:
datasette publish now database.db datasette publish now database.db
This will create a docker image containing both the datasette application and the specified SQLite database files. It will then deploy that image to Zeit Now and give you a URL to access the API. Or:
datasette publish heroku database.db
This will create a docker image containing both the datasette application and the specified SQLite database files. It will then deploy that image to Zeit Now or Heroku and give you a URL to access the API.
$ datasette publish --help $ datasette publish --help
Usage: datasette publish [OPTIONS] PUBLISHER [FILES]... Usage: datasette publish [OPTIONS] PUBLISHER [FILES]...
@ -138,23 +145,28 @@ This will create a docker image containing both the datasette application and th
Publish specified SQLite database files to the internet along with a Publish specified SQLite database files to the internet along with a
datasette API. datasette API.
Only current option for PUBLISHER is 'now'. You must have Zeit Now Options for PUBLISHER: * 'now' - You must have Zeit Now installed:
installed: https://zeit.co/now https://zeit.co/now * 'heroku' - You must have Heroku installed:
https://cli.heroku.com/
Example usage: datasette publish now my-database.db Example usage: datasette publish now my-database.db
Options: Options:
-n, --name TEXT Application name to use when deploying to Now -n, --name TEXT Application name to use when deploying to Now
-m, --metadata FILENAME Path to JSON file containing metadata to publish (ignored for Heroku)
--extra-options TEXT Extra options to pass to datasette serve -m, --metadata FILENAME Path to JSON file containing metadata to publish
--force Pass --force option to now --extra-options TEXT Extra options to pass to datasette serve
--branch TEXT Install datasette from a GitHub branch e.g. master --force Pass --force option to now
--title TEXT Title for metadata --branch TEXT Install datasette from a GitHub branch e.g. master
--license TEXT License label for metadata --template-dir DIRECTORY Path to directory containing custom templates
--license_url TEXT License URL for metadata --static STATIC MOUNT mountpoint:path-to-directory for serving static
--source TEXT Source label for metadata files
--source_url TEXT Source URL for metadata --title TEXT Title for metadata
--help Show this message and exit. --license TEXT License label for metadata
--license_url TEXT License URL for metadata
--source TEXT Source label for metadata
--source_url TEXT Source URL for metadata
--help Show this message and exit.
## datasette package ## datasette package
@ -166,17 +178,20 @@ If you have docker installed you can use `datasette package` to create a new Doc
Package specified SQLite files into a new datasette Docker container Package specified SQLite files into a new datasette Docker container
Options: Options:
-t, --tag TEXT Name for the resulting Docker container, can -t, --tag TEXT Name for the resulting Docker container, can
optionally use name:tag format optionally use name:tag format
-m, --metadata FILENAME Path to JSON file containing metadata to publish -m, --metadata FILENAME Path to JSON file containing metadata to publish
--extra-options TEXT Extra options to pass to datasette serve --extra-options TEXT Extra options to pass to datasette serve
--branch TEXT Install datasette from a GitHub branch e.g. master --branch TEXT Install datasette from a GitHub branch e.g. master
--title TEXT Title for metadata --template-dir DIRECTORY Path to directory containing custom templates
--license TEXT License label for metadata --static STATIC MOUNT mountpoint:path-to-directory for serving static
--license_url TEXT License URL for metadata files
--source TEXT Source label for metadata --title TEXT Title for metadata
--source_url TEXT Source URL for metadata --license TEXT License label for metadata
--help Show this message and exit. --license_url TEXT License URL for metadata
--source TEXT Source label for metadata
--source_url TEXT Source URL for metadata
--help Show this message and exit.
Both publish and package accept an `extra_options` argument option, which will affect how the resulting application is executed. For example, say you want to increase the SQL time limit for a particular container: Both publish and package accept an `extra_options` argument option, which will affect how the resulting application is executed. For example, say you want to increase the SQL time limit for a particular container: