diff options
Diffstat (limited to 'doc/administration')
| -rw-r--r-- | doc/administration/configuration.rst | 43 | ||||
| -rw-r--r-- | doc/administration/docker.rst | 33 | ||||
| -rw-r--r-- | doc/administration/installation.rst | 38 |
3 files changed, 82 insertions, 32 deletions
diff --git a/doc/administration/configuration.rst b/doc/administration/configuration.rst index 24c5fdb..99ce4d1 100644 --- a/doc/administration/configuration.rst +++ b/doc/administration/configuration.rst @@ -218,18 +218,44 @@ true``. This will cause the tiles to be loaded directly by the client. your users that third party content is included in your site, and that their IP will be accessible to the third party. +Overpass API +------------ + +Fietsboek uses Overpass_ to name climbs. You can set custom Overpass instances +in the config: + +.. code:: ini + + overpass.url = https://overpass.example.com/api/interpreter + # HTTP Basic auth, if needed: + overpass.basic_auth.username = fietsboek + overpass.basic_auth.password = super5ecre7 + +By default, Fietsboek uses the API instance at +https://maps.mail.ru/osm/tools/overpass/api/interpreter, however, it is often +overloaded and will respond with timeouts. + +.. note:: + + The URL needs to include the whole path to the interpreter script, so + usually it ends with ``/api/interpreter``. + +.. note:: + + Overpass has no standard way to do authentication. Commonly, the API key is + included in the URL. Fietsboek also has support for HTTP Basic auth. + +.. _Overpass: https://wiki.openstreetmap.org/wiki/Overpass_API + Hittekaart Integration ---------------------- -Fietsboek can use hittekaart_ to generate heat maps for users. For that, you -can set ``hittekaart.bin`` to the path to the ``hittekaart`` binary. If unset, -it is assumed that the binary can be found in your ``$PATH``. +Fietsboek can use hittekaart_ to generate heat maps for users. -In addition, you can set ``hittekaart.autogenerate`` to the list of overlay -maps you want to automatically generate and update. By default, this list is -empty, which means that Fietsboek will not generate any overlays on its own. -You can add ``heatmap`` and/or ``tilehunter`` to generate those maps -automatically. +You can set ``hittekaart.autogenerate`` to the list of overlay maps you want to +automatically generate and update. By default, this list is empty, which means +that Fietsboek will not generate any overlays on its own. You can add +``heatmap`` and/or ``tilehunter`` to generate those maps automatically. By default, ``hittekaart`` will use as many threads as CPU cores are available. This leads to the fastest heatmap generation, but might be undesired on shared @@ -253,7 +279,6 @@ An example configuration excerpt can look like this: .. code-block:: ini - hittekaart.bin = /usr/local/bin/hittekaart hittekaart.autogenerate = heatmap tilehunter hittekaart.threads = 2 diff --git a/doc/administration/docker.rst b/doc/administration/docker.rst index ed44a05..b5df268 100644 --- a/doc/administration/docker.rst +++ b/doc/administration/docker.rst @@ -68,21 +68,24 @@ the options that diverge from the default values:: The following environment variables are supported: -=============================== =============================== -Environment variable Setting -=============================== =============================== -``REDIS_URL`` [#f1]_ ``redis.url`` -``SQLALCHEMY_URL`` ``sqlalchemy.url`` -``DATA_DIR`` ``fietsboek.data_dir`` -``SESSION_KEY`` [#f2]_ ``session_key`` -``ENABLE_ACCOUNT_REGISTRATION`` ``enable_account_registration`` -``DEFAULT_LOCALE_NAME`` ``pyramid.default_locale_name`` -``EMAIL_FROM`` ``email.from`` -``EMAIL_SMTP_URL`` ``email.smtp_url`` -``EMAIL_USERNAME`` ``email.username`` -``EMAIL_PASSWORD`` ``email.password`` -``LOGLEVEL`` ``[logger_fietsboek] level`` -=============================== =============================== +================================ ================================ +Environment variable Setting +================================ ================================ +``REDIS_URL`` [#f1]_ ``redis.url`` +``SQLALCHEMY_URL`` ``sqlalchemy.url`` +``DATA_DIR`` ``fietsboek.data_dir`` +``SESSION_KEY`` [#f2]_ ``session_key`` +``ENABLE_ACCOUNT_REGISTRATION`` ``enable_account_registration`` +``DEFAULT_LOCALE_NAME`` ``pyramid.default_locale_name`` +``EMAIL_FROM`` ``email.from`` +``EMAIL_SMTP_URL`` ``email.smtp_url`` +``EMAIL_USERNAME`` ``email.username`` +``EMAIL_PASSWORD`` ``email.password`` +``OVERPASS_URL`` ``overpass.url`` +``OVERPASS_BASIC_AUTH_USERNAME`` ``overpass.basic_auth.username`` +``OVERPASS_BASIC_AUTH_PASSWORD`` ``overpass.basic_auth.password`` +``LOGLEVEL`` ``[logger_fietsboek] level`` +================================ ================================ .. [#f1] Required. .. [#f2] Defaults to a random string. diff --git a/doc/administration/installation.rst b/doc/administration/installation.rst index b207784..8c9c26e 100644 --- a/doc/administration/installation.rst +++ b/doc/administration/installation.rst @@ -6,14 +6,17 @@ This document will outline the installation process of Fietsboek, step-by-step. Requirements ------------ -Fietsboek has the following requirements (apart from the Python modules, which -will be installed by ``pip``): +Fietsboek has the following requirements: -* Python 3.10 or later -* A `redis <https://redis.com/>`__ server, used for caching and temporary data -* (Optionally) an SQL database server like `PostgreSQL - <https://www.postgresql.org/>`__ or `MariaDB <https://mariadb.org/>`__ (if - SQLite is not enough) +* A Linux system +* Python 3.11 or later +* A `redis <https://redis.com/>`__ server +* (Optionally) an SQL database server: + + * `PostgreSQL <https://www.postgresql.org/>`__ + +Other systems (such as BSD as operating system, or MariaDB as SQL server) might +work, but are not tested. In addition, if you run on a different interpreter than CPython, you might need a working Rust toolchain (``rustc`` and ``cargo``) installed. This is because @@ -97,6 +100,18 @@ parser to process the GPX files: .. _issue #7: https://gitlab.com/dunj3/fietsboek/-/issues/7 +Optional: Install Database Drivers +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +If you decide to use a database other than SQLite, you must install the +required drivers: + +**PostgreSQL**: + +.. code:: bash + + .venv/bin/pip install psycopg2 + Configuring Fietsboek --------------------- @@ -119,7 +134,7 @@ other update tasks. You can use it to set up the initial database schema: instead of a specific version, you must also run ``.venv/bin/alembic -c production.ini upgrade head``. - See :doc:`../developer/updater` ("Furhter notes") for more information. + See :doc:`../developer/updater` ("Further notes") for more information. Adding an Administrator User ---------------------------- @@ -164,6 +179,13 @@ performance. For those, refer to the Pyramid documentation for more information: * `mod_wsgi <https://docs.pylonsproject.org/projects/pyramid/en/latest/tutorials/modwsgi/index.html>`__ +.. note:: + + When you use ``gunicorn``, make sure to set ``forward_allow_ips`` properly. + This also applies to ``gunicorn`` in the Docker container: + + https://gunicorn.org/reference/settings/#forwarded_allow_ips + Maintaining Fietsboek --------------------- |
