Skip to content

Commit

Permalink
📝 [DOC] Fix install doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Chatewgne committed Jan 23, 2025
1 parent f12847c commit 05a50ae
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 15 deletions.
6 changes: 6 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ CHANGELOG
2.111.0+dev (XXXX-XX-XX)
----------------------------

**Breaking changes**

This version uses pgRouting. You need to install this extension in your database before upgrading to this version. See :

https://geotrek.readthedocs.io/en/latest/install/upgrade.html#from-geotrek-admin-2-112-0

**Warnings**

- When adding a via-point to a linear object's topology, it is now required to drop the new marker onto a path before the updated route is displayed, as the preview is no longer available when dragging the marker. This is due to the route computation now being performed on the backend. For more information, see https://github.com/GeotrekCE/Geotrek-admin/issues/4286
Expand Down
10 changes: 0 additions & 10 deletions docs/install/import.rst
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,6 @@ After importing a large quantity of paths, it is recommended to pre-generate the
paths graph needed for the routing. This action is not mandatory, but will reduce the time needed for the first
routing following the import.

To pre-generate the graph, use the ``generate_pgr_network_topology`` command::

sudo geotrek generate_pgr_network_topology
OR
docker compose run --rm web ./manage.py generate_pgr_network_topology

After importing a large quantity of paths, it is recommended to pre-generate the
paths graph needed for the routing. This action is not mandatory, but will reduce the time needed for the first
routing following the import.

To pre-generate the graph, use the ``generate_pgr_network_topology`` command::

sudo geotrek generate_pgr_network_topology
Expand Down
2 changes: 1 addition & 1 deletion docs/install/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ If you are not confident with the ``install.sh`` script, or if you are having tr
2. Add https://packages.geotrek.fr/geotrek.gpg.key to apt keyring.
3. Run ``apt-get update``
4. If you want to use a local database, install the pgRouting package by running ``sudo apt install -y postgresql-pgrouting wget software-properties-common`` (before installing Geotrek-admin, not at the same time).
If not, you must create database and enable PostGIS and pgRouting extensions before.
If not, you must create database and enable PostGIS, pgRouting and pgcrypto extensions before.
5. Install the Geotrek-admin package (``sudo apt install geotrek-admin``).

.. note ::
Expand Down
22 changes: 18 additions & 4 deletions docs/install/upgrade.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,31 @@ Make sure to run the following command **BEFORE** upgrading:
``su postgres -c "psql -q -d $POSTGRES_DB -c 'CREATE EXTENSION pgcrypto;'"``


From Geotrek-admin <= 2.110.0
From Geotrek-admin <= 2.112.0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

**WARNING!**

Starting from version 2.111.0, Geotrek now requires pgRouting. Before upgrading:
Starting from version 2.113.0, Geotrek now requires pgRouting. Please follow these steps before updating.

1. Install the pgRouting package by running ``sudo apt install -y postgresql-pgrouting wget software-properties-common``
**On a Debian installation :**

2. Run the following command: ``su postgres -c "psql -q -d $POSTGRES_DB -c 'CREATE EXTENSION pgrouting;'"``
1. Backup your database : ``sudo -u postgres pg_dump --no-acl --no-owner -Fc $POSTGRES_DB > `date +%Y%m%d%H%M`-database.backup``

2. Download and install the pgRouting package from the official website or using your distribution's package manager.

3. Activate the extension in your database : ``su postgres -c "psql -q -d $POSTGRES_DB -c 'CREATE EXTENSION pgrouting;'"``

4. Update Geotrek as usual


**On a Docker installation :**

1. Backup your database : ``docker compose run --rm web bash -c 'pg_dump --no-acl --no-owner -Fc -h postgres $POSTGRES_DB > `date +%Y%m%d%H%M`-database.backup'``

2. Replace the docker image in ``docker-compose.yml`` for service ``postgres`` with an image that includes PostgreSQL, PostGIS and pgRouting (`example with PostgreSQL 12, PostGIS 3.0 and pgRouting 3.0.0 <https://hubgw.docker.com/layers/pgrouting/pgrouting/12-3.0-3.0.0/images/sha256-382a2862cac07b0d3e57be9ddac587ad7a0d890ae2adc9fbae96a320a50194fb>`_). We highly recommend picking an image including the **same versions of PostgreSQL and PostGIS that you already use**. If you choose to pick later versions instead, you will need to delete your database, recreate it, and use ``pg_restore`` to restore the backup from step 1 (see ``Maintenance`` section).

3. Update Geotrek as usual


Server migration
Expand Down

0 comments on commit 05a50ae

Please sign in to comment.