From c028389a7df002a984debf79b158dab8a4e6b35c Mon Sep 17 00:00:00 2001 From: Theo Satabin Date: Mon, 29 Jan 2024 08:54:14 +0100 Subject: [PATCH] Ajout d'une image du serveur avec valgrind --- build/server/ubuntu-2004-valgrind.Dockerfile | 51 ++++++++++++++++++++ run/server/docker-compose-s3.yaml | 4 +- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 build/server/ubuntu-2004-valgrind.Dockerfile diff --git a/build/server/ubuntu-2004-valgrind.Dockerfile b/build/server/ubuntu-2004-valgrind.Dockerfile new file mode 100644 index 0000000..eada395 --- /dev/null +++ b/build/server/ubuntu-2004-valgrind.Dockerfile @@ -0,0 +1,51 @@ +FROM ubuntu:20.04 + +RUN apt update && apt -y install curl gettext + +ARG ROK4TILEMATRIXSETS_VERSION=4.1 +ENV ROK4TILEMATRIXSETS_VERSION=$ROK4TILEMATRIXSETS_VERSION +RUN curl -L -o rok4-tilematrixsets.deb https://github.com/rok4/tilematrixsets/releases/download/${ROK4TILEMATRIXSETS_VERSION}/rok4-tilematrixsets-${ROK4TILEMATRIXSETS_VERSION}-linux-all.deb && apt install ./rok4-tilematrixsets.deb + +ARG ROK4STYLES_VERSION=4.1 +ENV ROK4STYLES_VERSION=$ROK4STYLES_VERSION +RUN curl -L -o rok4-styles.deb https://github.com/rok4/styles/releases/download/${ROK4STYLES_VERSION}/rok4-styles-${ROK4STYLES_VERSION}-linux-all.deb && apt install ./rok4-styles.deb + +ARG ROK4CORECPP_VERSION +ENV ROK4CORECPP_VERSION=$ROK4CORECPP_VERSION +RUN curl -L -o librok4-dev.deb https://github.com/rok4/core-cpp/releases/download/${ROK4CORECPP_VERSION}/librok4-ceph-${ROK4CORECPP_VERSION}-ubuntu-20.04-amd64.deb && apt install -y ./librok4-dev.deb + +ARG ROK4SERVER_VERSION +ENV ROK4SERVER_VERSION=$ROK4SERVER_VERSION +RUN curl -L -o rok4-server.deb https://github.com/rok4/server/releases/download/${ROK4SERVER_VERSION}/rok4-server-${ROK4SERVER_VERSION}-ubuntu-20.04-amd64.deb && apt install -y ./rok4-server.deb + +# Configuration par variables d'environnement par défaut +ENV IMPORT_LAYERS_FROM_PYRAMIDS="" +ENV SERVER_LOGLEVEL="debug" SERVER_LOGOUTPUT="standard_output" SERVER_NBTHREAD="4" SERVER_CACHE_SIZE="1000" SERVER_CACHE_VALIDITY="10" SERVER_BACKLOG="0" +ENV SERVER_LAYERS="/etc/rok4/layers.txt" SERVER_STYLES="/usr/share/rok4/styles" SERVER_TMS="/usr/share/rok4/tilematrixsets" +ENV SERVICE_TITLE="WMS/WMTS/TMS server" SERVICE_ABSTRACT="This server provide WMS, WMTS and TMS raster and vector data broadcast" SERVICE_PROVIDERNAME="ROK4 Team" SERVICE_PROVIDERSITE="https://github.com/rok4/documentation" SERVICE_KEYWORDS="WMS,WMTS,TMS,Docker" +ENV SERVICE_FEE="none" SERVICE_ACCESSCONSTRAINT="none" +ENV SERVICE_WMS="WMS service" SERVICE_MAXWIDTH="10000" SERVICE_MAXHEIGHT="10000" SERVICE_LAYERLIMIT="2" SERVICE_MAXTILEX="256" SERVICE_MAXTILEY="256" SERVICE_FORMATLIST="image/jpeg,image/png,image/tiff,image/geotiff,image/x-bil;bits=32" +ENV SERVICE_GLOBALCRSLIST="CRS:84,EPSG:3857" SERVICE_FULLYSTYLING="true" SERVICE_INSPIRE="false" +ENV SERVICE_WMTSSUPPORT="true" SERVICE_TMSSUPPORT="true" SERVICE_WMSSUPPORT="true" SERVICE_OGCTILESSUPPORT="true" +ENV SERVICE_WMTS_ENDPOINT="http://localhost/wmts" SERVICE_TMS_ENDPOINT="http://localhost/tms" SERVICE_WMS_ENDPOINT="http://localhost/wms" SERVICE_OGCTILES_ENDPOINT="http://localhost/ogcapitiles" + +WORKDIR / + +# Déploiement des configurations +COPY ./server.template.json /etc/rok4/server.template.json +COPY ./services.template.json /etc/rok4/services.template.json + +COPY ./docker-entrypoint.sh / +RUN chmod +x /docker-entrypoint.sh + +RUN mkdir /etc/rok4/layers /pyramids + +RUN apt -y install valgrind + +VOLUME /etc/rok4/layers +VOLUME /pyramids + +EXPOSE 9000 + +ENTRYPOINT ["/docker-entrypoint.sh"] +CMD ["valgrind", "--leak-check=full", "/usr/bin/rok4", "-f", "/etc/rok4/server.json"] diff --git a/run/server/docker-compose-s3.yaml b/run/server/docker-compose-s3.yaml index aa9dbd9..ddc843a 100644 --- a/run/server/docker-compose-s3.yaml +++ b/run/server/docker-compose-s3.yaml @@ -13,7 +13,7 @@ services: - ./viewer:/usr/share/nginx/html/viewer middle: - image: rok4/server:5.0.4 + image: rok4/server:5.3.0 depends_on: - storage environment: @@ -29,6 +29,8 @@ services: - SERVER_LAYERS=s3://layers/list.txt - SERVER_STYLES=s3://styles - SERVER_TMS=s3://tilematrixsets + - SERVER_CACHE_VALIDITY=1 + - SERVER_CACHE_SIZE=1 storage: image: rok4/dataset:minio