mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Start datasette.json, re-add --config, rm settings.json
The first step in defining the new `datasette.json/yaml` configuration mechanism. Refs #2093, #2143, #493
This commit is contained in:
parent
01e0558825
commit
17ec309e14
7 changed files with 55 additions and 93 deletions
|
|
@ -112,8 +112,7 @@ Once started you can access it at ``http://localhost:8001``
|
|||
--static MOUNT:DIRECTORY Serve static files from this directory at
|
||||
/MOUNT/...
|
||||
--memory Make /_memory database available
|
||||
--config CONFIG Deprecated: set config option using
|
||||
configname:value. Use --setting instead.
|
||||
--config FILENAME Path to JSON/YAML Datasette configuration file
|
||||
--setting SETTING... Setting, see
|
||||
docs.datasette.io/en/stable/settings.html
|
||||
--secret TEXT Secret used for signing secure values, such as
|
||||
|
|
|
|||
10
docs/configuration.rst
Normal file
10
docs/configuration.rst
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
.. _configuration:
|
||||
|
||||
Configuration
|
||||
========
|
||||
|
||||
Datasette offers many way to configure your Datasette instances: server settings, plugin configuration, authentication, and more.
|
||||
|
||||
To facilitate this, You can provide a `datasette.yaml` configuration file to datasette with the ``--config``/ ``-c`` flag:
|
||||
|
||||
datasette mydatabase.db --config datasette.yaml
|
||||
|
|
@ -47,9 +47,9 @@ Datasette will detect the files in that directory and automatically configure it
|
|||
The files that can be included in this directory are as follows. All are optional.
|
||||
|
||||
* ``*.db`` (or ``*.sqlite3`` or ``*.sqlite``) - SQLite database files that will be served by Datasette
|
||||
* ``datasette.json`` - :ref:`configuration` for the Datasette instance
|
||||
* ``metadata.json`` - :ref:`metadata` for those databases - ``metadata.yaml`` or ``metadata.yml`` can be used as well
|
||||
* ``inspect-data.json`` - the result of running ``datasette inspect *.db --inspect-file=inspect-data.json`` from the configuration directory - any database files listed here will be treated as immutable, so they should not be changed while Datasette is running
|
||||
* ``settings.json`` - settings that would normally be passed using ``--setting`` - here they should be stored as a JSON object of key/value pairs
|
||||
* ``templates/`` - a directory containing :ref:`customization_custom_templates`
|
||||
* ``plugins/`` - a directory containing plugins, see :ref:`writing_plugins_one_off`
|
||||
* ``static/`` - a directory containing static files - these will be served from ``/static/filename.txt``, see :ref:`customization_static_files`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue