From fa52a48aeb9f86fcbb0f9f0c3776f08f6eaac8a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Wed, 24 Jun 2020 11:06:55 +0200 Subject: [PATCH] Fix the documentation to generate the tiles --- doc/integrator/objectstorage.rst | 20 ++++++++++++------- .../create/docker-compose-lib.yaml_tmpl | 4 ++++ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/doc/integrator/objectstorage.rst b/doc/integrator/objectstorage.rst index 112334e805..6036f4789f 100644 --- a/doc/integrator/objectstorage.rst +++ b/doc/integrator/objectstorage.rst @@ -44,9 +44,10 @@ Create the vrt file for a raster layer: .. prompt:: bash - docker-compose exec geoportal ${'\\'} - gdalbuildvrt /vsis3///index.vrt \ - $(list4vrt /) + docker-compose exec geoportal bash -c ${'\\'} + 'gdalbuildvrt /vsis3///index.vrt \ + $(list4vrt / .tif)' + MapServer --------- @@ -55,10 +56,15 @@ Create the shape index file for a raster layer: .. prompt:: bash - gdaltindex mapserver/index.shp \ - `aws --endpoint-url https://sos-ch-dk-2.exo.io/ --region ch-dk-2 \ - s3 ls s3://// | grep tif | awk '{print "/vsis3///"$4}'` - + docker-compose exec geoportal bash -c \ + 'gdaltindex index.shp $(\ + aws --endpoint-url http://${AWS_S3_ENDPOINT} --region ${AWS_DEFAULT_REGION} \ + s3 ls s3://// | grep tif$ | \ + awk '"'"'{print "/vsis3///"$4}'"'"' + )' + docker cp _geoportal_1:/app/index.shp mapserver/ + docker cp _geoportal_1:/app/index.shx mapserver/ + docker cp _geoportal_1:/app/index.dbf mapserver/ Add the following config in the ``mapserver/mapserver.map.tmpl`` file: diff --git a/geoportal/c2cgeoportal_geoportal/scaffolds/create/docker-compose-lib.yaml_tmpl b/geoportal/c2cgeoportal_geoportal/scaffolds/create/docker-compose-lib.yaml_tmpl index b53b7858fb..5d4f80d33f 100644 --- a/geoportal/c2cgeoportal_geoportal/scaffolds/create/docker-compose-lib.yaml_tmpl +++ b/geoportal/c2cgeoportal_geoportal/scaffolds/create/docker-compose-lib.yaml_tmpl @@ -180,6 +180,10 @@ services: - C2C_DEBUG_VIEW_ENABLED=TRUE - C2C_SECRET - LOG_TYPE + - AWS_ACCESS_KEY_ID + - AWS_SECRET_ACCESS_KEY + - AWS_DEFAULT_REGION + - AWS_S3_ENDPOINT alembic: image: ${DOCKER_BASE}-geoportal:${DOCKER_TAG}