Skip to content

Commit

Permalink
Obsessively formating key and values monospaced
Browse files Browse the repository at this point in the history
  • Loading branch information
smonff committed Sep 29, 2019
1 parent 924ec48 commit 215f164
Showing 1 changed file with 56 additions and 56 deletions.
112 changes: 56 additions & 56 deletions docs/installation/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Configuration
Letting the app know which config use
-------------------------------------

Setting the right config file to use is done by using the environment variable `APP_SETTINGS`.
Setting the right config file to use is done by using the environment variable ``APP_SETTINGS``.

If your configuration file is `api/config/prod_secret.py` you should define your variable as:
If your configuration file is ``api/config/prod_secret.py`` you should define your variable as:

.. code-block:: shell
Expand All @@ -17,73 +17,73 @@ If your configuration file is `api/config/prod_secret.py` you should define your
Overriding using environment
----------------------------

Any key can be overriden using the environment, see the configuration table for the related env key
Any key can be overriden using the environment, see the configuration table for the related env keys.

Creating your configuration file
--------------------------------

You can use `production_secret_sample.py` as example, naming them `whatyouwant_secret.py`, the `_secret.py` will make sure git ignore it.
You can use `production_secret_sample.py` as an example, naming them ``whatyouwant_secret.py``, the ``_secret.py`` part making it ignored by git.

Configuration keys and definitions
----------------------------------

+-------------------------+----------------------------------------------------+---------------------------------------------------------------------------+
| Key | Default value | Description |
+=========================+====================================================+===========================================================================+
| TESTING | False | Used only for unit tests |
+-------------------------+----------------------------------------------------+---------------------------------------------------------------------------+
| DEBUG | False | Used in development mode |
+-------------------------+----------------------------------------------------+---------------------------------------------------------------------------+
| REGISTRATION_ENABLED | True | Allow user registration |
+-------------------------+----------------------------------------------------+---------------------------------------------------------------------------+
| SECRET_KEY | None | Used for various security things in Flask |
+-------------------------+----------------------------------------------------+---------------------------------------------------------------------------+
| SECURITY_PASSWORD_SALT | None | Used for salting the users passwords |
+-------------------------+----------------------------------------------------+---------------------------------------------------------------------------+
| SQLALCHEMY_DATABASE_URI | postgresql+psycopg2://postgres@localhost/reel2bits | Database connection chain |
+-------------------------+----------------------------------------------------+---------------------------------------------------------------------------+
| SQLALCHEMY_ECHO | False | Do SQLAlchemy needs to echo every queries, useful in dev/debug |
+-------------------------+----------------------------------------------------+---------------------------------------------------------------------------+
| SECURITY_CONFIRMABLE | True | Should users have to confirm their email address |
+-------------------------+----------------------------------------------------+---------------------------------------------------------------------------+
| BABEL_DEFAULT_LOCALE | en | Backend default locale |
+-------------------------+----------------------------------------------------+---------------------------------------------------------------------------+
| BABEL_DEFAULT_TIMEZONE | UTC | Backend default timezone, might have no effect |
+-------------------------+----------------------------------------------------+---------------------------------------------------------------------------+
| AUDIOWAVEFORM_BIN | /usr/local/bin/audiowaveform | Path to the Audiowaveform tool |
+-------------------------+----------------------------------------------------+---------------------------------------------------------------------------+
| SENTRY_DSN | None | If you use sentry you can define your DSN here |
+-------------------------+----------------------------------------------------+---------------------------------------------------------------------------+
| CELERY_BROKER_URL | redis://127.0.0.1:6379/0 | Ideally the same as the following |
+-------------------------+----------------------------------------------------+---------------------------------------------------------------------------+
| CELERY_RESULT_BACKEND | redis://127.0.0.1:6379/0 | |
+-------------------------+----------------------------------------------------+---------------------------------------------------------------------------+
| AP_DOMAIN | localhost | The domain you uses for your instance, needed even if AP_ENABLED is False |
+-------------------------+----------------------------------------------------+---------------------------------------------------------------------------+
| AP_ENABLED | False | Is the ActivityPub backend active |
+-------------------------+----------------------------------------------------+---------------------------------------------------------------------------+
| SOURCES_REPOSITORY_URL | Url to the source code | You should set your own repo url if you have done any customisation |
+-------------------------+----------------------------------------------------+---------------------------------------------------------------------------+
| MAIL_SERVER | localhost | Mail server IP or DNS |
+-------------------------+----------------------------------------------------+---------------------------------------------------------------------------+
| MAIL_PORT | 25 | Mail server port |
+-------------------------+----------------------------------------------------+---------------------------------------------------------------------------+
| MAIL_USE_TLS | False | Mail server is using TLS ? |
+-------------------------+----------------------------------------------------+---------------------------------------------------------------------------+
| MAIL_USE_SSL | False | Mail server is using SSL ? |
+-------------------------+----------------------------------------------------+---------------------------------------------------------------------------+
| MAIL_USERNAME | None | Mail server username |
+-------------------------+----------------------------------------------------+---------------------------------------------------------------------------+
| MAIL_PASSWORD | None | Mail server password |
+-------------------------+----------------------------------------------------+---------------------------------------------------------------------------+
+-----------------------------+--------------------------------------------------------+---------------------------------------------------------------------------+
| Key | Default value | Description |
+=============================+========================================================+===========================================================================+
| ``TESTING`` | ``False`` | Used only for unit tests |
+-----------------------------+--------------------------------------------------------+---------------------------------------------------------------------------+
| ``DEBUG`` | ``False`` | Used in development mode |
+-----------------------------+--------------------------------------------------------+---------------------------------------------------------------------------+
| ``REGISTRATION_ENABLED`` | ``True`` | Allow user registration |
+-----------------------------+--------------------------------------------------------+---------------------------------------------------------------------------+
| ``SECRET_KEY`` | ``None`` | Used for various security things in Flask |
+-----------------------------+--------------------------------------------------------+---------------------------------------------------------------------------+
| ``SECURITY_PASSWORD_SALT`` | ``None`` | Used for salting the users passwords |
+-----------------------------+--------------------------------------------------------+---------------------------------------------------------------------------+
| ``SQLALCHEMY_DATABASE_URI`` | ``postgresql+psycopg2://postgres@localhost/reel2bits`` | Database connection chain |
+-----------------------------+--------------------------------------------------------+---------------------------------------------------------------------------+
| ``SQLALCHEMY_ECHO`` | ``False`` | Do SQLAlchemy needs to echo every queries, useful in dev/debug |
+-----------------------------+--------------------------------------------------------+---------------------------------------------------------------------------+
| ``SECURITY_CONFIRMABLE`` | ``True`` | Should users have to confirm their email address |
+-----------------------------+--------------------------------------------------------+---------------------------------------------------------------------------+
| ``BABEL_DEFAULT_LOCALE`` | ``en`` | Backend default locale |
+-----------------------------+--------------------------------------------------------+---------------------------------------------------------------------------+
| ``BABEL_DEFAULT_TIMEZONE`` | ``UTC`` | Backend default timezone, might have no effect |
+-----------------------------+--------------------------------------------------------+---------------------------------------------------------------------------+
| ``AUDIOWAVEFORM_BIN`` | ``/usr/local/bin/audiowaveform`` | Path to the Audiowaveform tool |
+-----------------------------+--------------------------------------------------------+---------------------------------------------------------------------------+
| ``SENTRY_DSN`` | ``None`` | If you use sentry you can define your DSN here |
+-----------------------------+--------------------------------------------------------+---------------------------------------------------------------------------+
| ``CELERY_BROKER_URL`` | ``redis://127.0.0.1:6379/0`` | Ideally the same as the following |
+-----------------------------+--------------------------------------------------------+---------------------------------------------------------------------------+
| ``CELERY_RESULT_BACKEND`` | ``redis://127.0.0.1:6379/0`` | |
+-----------------------------+--------------------------------------------------------+---------------------------------------------------------------------------+
| ``AP_DOMAIN`` | ``localhost`` | The instance domain, needed even if ``AP_ENABLED`` is ``False`` |
+-----------------------------+--------------------------------------------------------+---------------------------------------------------------------------------+
| ``AP_ENABLED`` | ``False`` | Is the ActivityPub backend active |
+-----------------------------+--------------------------------------------------------+---------------------------------------------------------------------------+
| ``SOURCES_REPOSITORY_URL`` | ``Url to the source code`` | You should set your own repo url if you have done any customisation |
+-----------------------------+--------------------------------------------------------+---------------------------------------------------------------------------+
| ``MAIL_SERVER`` | ``localhost`` | Mail server IP or DNS |
+-----------------------------+--------------------------------------------------------+---------------------------------------------------------------------------+
| ``MAIL_PORT`` | ``25`` | Mail server port |
+-----------------------------+--------------------------------------------------------+---------------------------------------------------------------------------+
| ``MAIL_USE_TLS`` | ``False`` | Mail server is using TLS ? |
+-----------------------------+--------------------------------------------------------+---------------------------------------------------------------------------+
| ``MAIL_USE_SSL`` | ``False`` | Mail server is using SSL ? |
+-----------------------------+--------------------------------------------------------+---------------------------------------------------------------------------+
| ``MAIL_USERNAME`` | ``None`` | Mail server username |
+-----------------------------+--------------------------------------------------------+---------------------------------------------------------------------------+
| ``MAIL_PASSWORD`` | ``None`` | Mail server password |
+-----------------------------+--------------------------------------------------------+---------------------------------------------------------------------------+

Upload paths
------------

You can use the following keys to define upload paths:

- UPLOADS_DEFAULT_DEST, default: /home/reel2bits/uploads
- UPLOADED_SOUNDS_DEST, default: /home/reel2bits/uploads/sounds
- UPLOADED_WAVEFORMS_DEST, default: /home/reel2bits/uploads/sounds
- ``UPLOADS_DEFAULT_DEST``, default: ``/home/reel2bits/uploads``
- ``UPLOADED_SOUNDS_DEST``, default: ``/home/reel2bits/uploads/sounds``
- ``UPLOADED_WAVEFORMS_DEST``, default: ``/home/reel2bits/uploads/sounds``

Paths of sounds and waveforms should be under the default one.

0 comments on commit 215f164

Please sign in to comment.