Skip to content

Commit

Permalink
Update documentation for the revision 856a095
Browse files Browse the repository at this point in the history
  • Loading branch information
c2c-bot-gis-ci committed Dec 19, 2023
1 parent b5672a8 commit 04cafb6
Show file tree
Hide file tree
Showing 39 changed files with 118 additions and 118 deletions.
2 changes: 1 addition & 1 deletion master/_sources/administrator/mapfile.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -425,4 +425,4 @@ For example to validate the map files run:

.. prompt:: bash

docker-compose exec tools mappyfile validate --version=7.6 /etc/mapserver/*.map
docker compose exec tools mappyfile validate --version=7.6 /etc/mapserver/*.map
14 changes: 7 additions & 7 deletions master/_sources/developer/custom_alembic.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ an ``alembic.ini`` file, like the /tmp folder. Create also directly the first re

.. prompt:: bash

docker-compose exec geoportal mkdir /tmp/new_alembic
docker-compose exec geoportal bash -c "cd /tmp/new_alembic; alembic init alembic"
docker compose exec geoportal mkdir /tmp/new_alembic
docker compose exec geoportal bash -c "cd /tmp/new_alembic; alembic init alembic"
# Ignore the warning message about setting the alembic.ini file for now.
docker-compose exec geoportal bash -c "cd /tmp/new_alembic; alembic revision -m 'Inital revision'"
docker compose exec geoportal bash -c "cd /tmp/new_alembic; alembic revision -m 'Inital revision'"

Run ``docker-compose ps geoportal`` to know the name of the running geoportal container.
Run ``docker compose ps geoportal`` to know the name of the running geoportal container.

Then copy the generated alembic folder in the ``geoportal`` folder of your project:

Expand Down Expand Up @@ -86,12 +86,12 @@ At this point, you should be able to run your (currently empty) first revision f
Run an alembic upgrade
----------------------

Once your revision file completed, build and run docker-compose up on your project.
Once your revision file completed, build and run docker compose up on your project.
Your alembic files should be in the running container. You can now run manually an upgrade with:

.. prompt:: bash

docker-compose exec geoportal bash -c "cd /app/alembic_${PROJECT}; alembic upgrade head"
docker compose exec geoportal bash -c "cd /app/alembic_${PROJECT}; alembic upgrade head"

Create a new revision file
--------------------------
Expand All @@ -100,5 +100,5 @@ With a running instance, execute:

.. prompt:: bash

docker-compose exec geoportal bash -c "cd /app/alembic_${PROJECT}; alembic revision -m '<msg>'"
docker compose exec geoportal bash -c "cd /app/alembic_${PROJECT}; alembic revision -m '<msg>'"
docker cp <geoportal_container_name>:/app/alembic_${PROJECT}/alembic/versions/<the_new_file> geoportal/alembic_${PROJECT}/alembic/versions/.
16 changes: 8 additions & 8 deletions master/_sources/developer/debugging.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Application debugging
The goal of this document is to give some troubleshooting tips.

First, you should copy the file ``docker-compose.override.sample.yaml`` to
``docker-compose.override.yaml``, and update the composition ``docker-compose up -d``.
``docker-compose.override.yaml``, and update the composition ``docker compose up -d``.

Then access the application on `https://localhost:8484/ <https://localhost:8484/>`_.

Expand Down Expand Up @@ -84,7 +84,7 @@ Sometimes, more information can be obtained by using this command:

.. prompt:: bash

docker-compose exec mapserver shp2img -m /etc/mapserver/mapserver.map -o /tmp/test.png \
docker compose exec mapserver shp2img -m /etc/mapserver/mapserver.map -o /tmp/test.png \
-e 500000 100000 700000 300000 -s 1000 1000 [-l <layers>]

You may also activate MapServer's debug mode and set the environment variable ``MS_DEBUGLEVEL``
Expand All @@ -103,7 +103,7 @@ With the following command, you can access the logs:

.. prompt:: bash

docker-compose logs -f --tail=20 [<service_name>]
docker compose logs -f --tail=20 [<service_name>]

To have the access log on gunicorn you should add the option ``--access-logfile=-`` in the gunicorn
configuration (``gunicorn.conf.py`` file).
Expand All @@ -115,7 +115,7 @@ With the following command, you can get a terminal in a container:

.. prompt:: bash

docker-compose exec [--user=root] <service_name> bash
docker compose exec [--user=root] <service_name> bash

Multiple dev on one server
..........................
Expand All @@ -125,7 +125,7 @@ When you want to run multiple instances on the same server, you should:
- Use a different docker tag for each instance (``DOCKER_TAG`` in the file ``.env`` files,
used on the build and on the run)
- Use a different project name for each instance (``COMPOSE_PROJECT_NAME`` in the
``.env`` or option ``-p`` of ``docker-compose``)
``.env`` or option ``-p`` of ``docker compose``)
- Use a different port for each instance (``DOCKER_PORT`` in the ``.env``)
- If you want to serve your instances through the same Apache server, each instance must have
different entry points. (``VISIBLE_ENTRY_POINT`` in the ``.env``)
Expand All @@ -134,8 +134,8 @@ When you want to run multiple instances on the same server, you should:
Developing in Python
--------------------

Create a development docker-compose.override.yaml
.................................................
Create a development ``docker-compose.override.yaml``
.....................................................

Be sure that the volume for the project is not commented out in ``docker-compose.override.yaml``.

Expand Down Expand Up @@ -243,7 +243,7 @@ Within the Docker composition, you can access a port of a container; you can ach

.. prompt:: bash

docker-compose exec tools curl "http://mapserver:8080?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities"
docker compose exec tools curl "http://mapserver:8080?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities"

You can also expose a service out of the Docker composition. For that, add a port in your
``docker-compose.yaml``, e.g.:
Expand Down
6 changes: 3 additions & 3 deletions master/_sources/developer/server_side.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Running tests

c2cgeoportal has two types of tests: unit tests and functional tests. The unit
tests are self-contained, and do not require any specific setup. The functional
tests require to run with ``docker-compose``.
tests require to run with ``docker compose``.

Unit tests
..........
Expand All @@ -65,7 +65,7 @@ To run only a specific test, use the ``-k`` switch. For example:

.. prompt:: bash

docker-compose exec tests pytest --verbose --color=yes \
docker compose exec tests pytest --verbose --color=yes \
-k test_catalogue /opt/c2cgeoportal/geoportal/tests

Database
Expand Down Expand Up @@ -122,7 +122,7 @@ Then, customize the migration to suit your needs, test it:

.. prompt:: bash

docker-compose exec geoportal upgrade head
docker compose exec geoportal upgrade head

More information at:
* https://alembic.readthedocs.org/en/latest/index.html
Expand Down
2 changes: 1 addition & 1 deletion master/_sources/integrator/authentication.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ You can generate a new admin password the following command:

.. argparse::
:ref: c2cgeoportal_geoportal.scripts.manage_users.get_argparser
:prog: docker-compose exec geoportal manage-users
:prog: docker compose exec geoportal manage-users

~~~~~~~~~~~~~~~~~~~~
External application
Expand Down
2 changes: 1 addition & 1 deletion master/_sources/integrator/build.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Upstream `make documentation <https://www.gnu.org/software/make/manual/make.html
Custom image
------------

In the build script, we use `docker-compose build`, as this simplifies adding a new service from another `Dockerfile`.
In the build script, we use `docker compose build`, as this simplifies adding a new service from another `Dockerfile`.

By adding the following in the `docker-compose.yaml` file:

Expand Down
2 changes: 1 addition & 1 deletion master/_sources/integrator/create_application.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ Then follow the sections in the install application guide:

.. prompt:: bash

docker-compose exec geoportal create-demo-theme
docker compose exec geoportal create-demo-theme


Dynamic configuration
Expand Down
2 changes: 1 addition & 1 deletion master/_sources/integrator/database.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ If you have not yet created this function in your database, use to following com

.. prompt:: bash

docker-compose exec tools psql --file=/opt/clone_schema.sql
docker compose exec tools psql --file=/opt/clone_schema.sql

To use the function, connect to your database and perform the following statement:

Expand Down
6 changes: 3 additions & 3 deletions master/_sources/integrator/docker.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ Docker compose files
--------------------

* ``docker-compose.yaml``: The main file that describes the composition.
* ``docker-compose-lib.yaml``: Provideis the base description of Geomapfish Docker services.
* ``docker-compose-lib.yaml``: Provide the base description of Geomapfish Docker services.
* ``.env``: Generated from the env files; contains the environment variables used by the composition.
* ``docker-compose.override[.sample].yaml``: Some rules for debuggung.
* ``docker-compose.override[.sample].yaml``: Some rules for debugging.
* ``.env``: The variable used in the compose files.


Expand All @@ -142,7 +142,7 @@ Run the developer composition

.. prompt:: bash

docker-compose up -d
docker compose up -d

You can then access your application with `https://localhost:8484/ <https://localhost:8484/>`_.

Expand Down
2 changes: 1 addition & 1 deletion master/_sources/integrator/extend_application.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Extend the application
To add an additional component in the project in simple mode we should:

- use an interface in canvas mode
- add a custom docker-compose service
- add a custom docker compose service
- add a custom JavaScript file

In this tutorial, we will:
Expand Down
6 changes: 3 additions & 3 deletions master/_sources/integrator/extend_data_model.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -298,15 +298,15 @@ Build and run the application:
.. prompt:: bash

./build <args>
docker-compose up -d
docker compose up -d

Get and run the SQL command to create the tables:

Run Python console:

.. prompt:: bash

docker-compose exec geoportal python3
docker compose exec geoportal python3

Execute the following code:

Expand All @@ -326,6 +326,6 @@ Run pSQL console:

.. prompt:: bash

docker-compose exec tools psql
docker compose exec tools psql

And enter the SQL commands
2 changes: 1 addition & 1 deletion master/_sources/integrator/fulltext_search.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ A script is available to fill the full-text search table:

.. argparse::
:ref: c2cgeoportal_geoportal.scripts.theme2fts.get_argparser
:prog: docker-compose exec geoportal theme2fts
:prog: docker compose exec geoportal theme2fts

Note that some tree items' metadata are used by the ``theme2fts`` script:

Expand Down
6 changes: 3 additions & 3 deletions master/_sources/integrator/install_application.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,15 @@ Run the composition:

.. prompt:: bash

docker-compose up -d
docker compose up -d

Then create the application tables:

.. prompt:: bash

docker-compose exec geoportal alembic --config=alembic.ini \
docker compose exec geoportal alembic --config=alembic.ini \
--name=main upgrade head
docker-compose exec geoportal alembic --config=alembic.ini \
docker compose exec geoportal alembic --config=alembic.ini \
--name=static upgrade head

Your application should now be available at: ``https://localhost:8484/``.
Expand Down
22 changes: 11 additions & 11 deletions master/_sources/integrator/objectstorage.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Create the vrt file for a raster layer:

.. prompt:: bash

docker-compose exec geoportal bash -c \
docker compose exec geoportal bash -c \
'gdalbuildvrt /vsis3/<bucket>/<folder>/index.vrt \
$(list4vrt <bucket> <folder>/ .tif)'

Expand All @@ -64,19 +64,19 @@ Use list the container:

.. prompt:: bash

docker-compose exec geoportal azure --list-container
docker compose exec geoportal azure --list-container

Use list the files:

.. prompt:: bash

docker-compose exec geoportal azure --container=<container> --list ''
docker compose exec geoportal azure --container=<container> --list ''

Create the vrt file for a raster layer:

.. prompt:: bash

docker-compose exec geoportal azure --container=<container> --vrt <folder>/ .tiff
docker compose exec geoportal azure --container=<container> --vrt <folder>/ .tiff


MapServer
Expand All @@ -88,7 +88,7 @@ Exoscale:

.. prompt:: bash

docker-compose exec geoportal bash -c \
docker compose exec geoportal bash -c \
'gdaltindex mapserver/index.shp $( \
aws --endpoint-url http://${AWS_S3_ENDPOINT} \
--region ${AWS_DEFAULT_REGION} \
Expand All @@ -105,11 +105,11 @@ Azure:

.. prompt:: bash

docker-compose exec geoportal rm index.shp
docker-compose exec geoportal rm index.shx
docker-compose exec geoportal rm index.dbf
docker-compose exec geoportal rm index.prj
docker-compose exec geoportal bash -c \
docker compose exec geoportal rm index.shp
docker compose exec geoportal rm index.shx
docker compose exec geoportal rm index.dbf
docker compose exec geoportal rm index.prj
docker compose exec geoportal bash -c \
'gdaltindex mapserver/index.shp $( \
azure --container=<container> --list <folder>/ | \
grep tiff$ | \
Expand Down Expand Up @@ -225,7 +225,7 @@ Exoscale:
* ``AWS_DEFAULT_REGION=ch-dk-2``: Should already be in your env.project.
* ``AWS_S3_ENDPOINT=sos-ch-dk-2.exo.io``: Should already be in your env.project.

Azure docker-compose:
Azure docker compose:

* ``AZURE_STORAGE_CONNECTION_STRING``: The connection string.

Expand Down
4 changes: 2 additions & 2 deletions master/_sources/integrator/requirements.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ components installed on your system:

* **Git**
* **Docker** >= 17.05
* **Docker Compose** >= 2.20
* **Python** >= 3.8, with ``pip``
* **Apache** >= 2.4 (optional, can be used as a front for SSL)
* **PostgreSQL** >= 9.1/**PostGIS** >= 2.1
Expand All @@ -17,13 +18,12 @@ Required Python packages
~~~~~~~~~~~~~~~~~~~~~~~~

* ``PyYAML>=3.13``
* ``docker-compose>=1.26.0``

They can be install in your user directory with:

.. code:: bash
python3 -m pip install --user PyYAML docker-compose
python3 -m pip install --user PyYAML
If not yet done, add ``$HOME/.local/bin`` to your ``PATH``; add in your ``~/.bashrc`` file:

Expand Down
10 changes: 5 additions & 5 deletions master/_sources/integrator/tilegeneration_doc.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ The main thing to do is to:

.. prompt:: bash

docker-compose exec tilecloudchain generate-tiles \
docker compose exec tilecloudchain generate-tiles \
--get-hash <max-zoom>/0/0 --layer <layer>

We consider that the first tile of the max zoom is empty.
Expand All @@ -92,25 +92,25 @@ This package offers two tools, one to generate the tiles locally, see help:

.. prompt:: bash

docker-compose exec tilecloudchain generate-tiles --help
docker compose exec tilecloudchain generate-tiles --help

one to generate the tiles using AWS, see help:

.. prompt:: bash

docker-compose exec tilecloudchain generate_controller --help
docker compose exec tilecloudchain generate_controller --help

Before starting a tile generation on S3, measure the cost:

.. prompt:: bash

docker-compose exec tilecloudchain generate_controller --cost
docker compose exec tilecloudchain generate_controller --cost

If you setup all the default options, you can generate the tiles by using the command:

.. prompt:: bash

docker-compose exec tilecloudchain generate-tiles
docker compose exec tilecloudchain generate-tiles


AWS credentials
Expand Down
Loading

0 comments on commit 04cafb6

Please sign in to comment.