Loading .dockerignoredeleted 100644 → 0 +0 −2 Original line number Diff line number Diff line * !scripts .gitignoredeleted 100644 → 0 +0 −0 Empty file deleted. .gitlab-ci.yml +3 −116 Original line number Diff line number Diff line include: - project: 'redmic-project/gitlab-ci-templates' ref: master file: '/packaging.yml' - project: 'redmic-project/gitlab-ci-templates' ref: master file: '/_deployment.yml' file: '/deployment.yml' stages: - package - test-package - deploy variables: STACK: gis .deploy: variables: SERVICES_TO_CHECK: ${STACK}_${SERVICE_NAME} script: - > deploy.sh IMAGE_NAME=${IMAGE_NAME} IMAGE_TAG=${IMAGE_TAG} COMPOSE_FILE=${COMPOSE_FILE} GEOSERVER_ADMIN_SUBDOMAIN=${GEOSERVER_ADMIN_SUBDOMAIN} GEOSERVER_SUBDOMAIN=${GEOSERVER_SUBDOMAIN} PUBLIC_HOSTNAME=${PUBLIC_HOSTNAME} GEOSERVER_PASS=${GEOSERVER_PASS} environment: url: https://${GEOSERVER_ADMIN_SUBDOMAIN}.${PUBLIC_HOSTNAME} .deploy-development: variables: COMPOSE_FILE: docker-compose.${SERVICE_NAME}.tmpl.yml:docker-compose.${SERVICE_NAME}.dev.yml environment: name: dev/${SERVICE_NAME} .deploy-production: variables: COMPOSE_FILE: docker-compose.${SERVICE_NAME}.tmpl.yml:docker-compose.${SERVICE_NAME}.prod.yml STACK: gis environment: name: pro/${SERVICE_NAME} .deploy-geoserver-master: variables: &deploy-geoserver-master SERVICE_NAME: geoserver-master .deploy-geoserver-slave: variables: &deploy-geoserver-slave SERVICE_NAME: geoserver-slave .deploy-geoserver-master-development: extends: .deploy-development variables: *deploy-geoserver-master .deploy-geoserver-slave-development: extends: .deploy-development variables: *deploy-geoserver-slave .deploy-geoserver-master-production: extends: .deploy-production variables: *deploy-geoserver-master .deploy-geoserver-slave-production: extends: .deploy-production variables: *deploy-geoserver-slave deploy-geoserver-master-support-branch-development: extends: .deploy-geoserver-master-development only: - branches except: - master - schedules deploy-geoserver-slave-support-branch-development: extends: .deploy-geoserver-slave-development only: - branches except: - master - schedules deploy-geoserver-master-stable-branch-development: extends: .deploy-geoserver-master-development only: - master except: - schedules deploy-geoserver-slave-stable-branch-development: extends: .deploy-geoserver-slave-development only: - master except: - schedules deploy-geoserver-master-stable-branch-production: extends: .deploy-geoserver-master-production only: - master except: - schedules deploy-geoserver-slave-stable-branch-production: extends: .deploy-geoserver-slave-production only: - master except: - schedules deploy-geoserver-master-version-development: extends: .deploy-geoserver-master-development only: - tags deploy-geoserver-slave-version-development: extends: .deploy-geoserver-slave-development only: - tags deploy-geoserver-master-version-production: extends: .deploy-geoserver-master-production only: - tags deploy-geoserver-slave-version-production: extends: .deploy-geoserver-slave-production only: - tags No newline at end of file url: https://${GEOSERVER_SUBDOMAIN}.${PUBLIC_HOSTNAME} Dockerfiledeleted 100644 → 0 +0 −239 Original line number Diff line number Diff line FROM sgrio/java:jdk_8_ubuntu AS build_apr ENV APR_VERSION="1.6.5" \ TOMCAT_NATIVE_VERSION="1.2.18" \ TEMP_PATH="/tmp/resources" RUN apt-get update && \ apt-get install -y --no-install-recommends \ build-essential \ openssl \ libssl-dev \ curl && \ rm -rf /var/lib/apt/lists/* && \ mkdir -p "${TEMP_PATH}" && \ # # Install APR # APR_FILENAME="apr-${APR_VERSION}.tar.gz" && \ URL="http://www.us.apache.org/dist/apr/${APR_FILENAME}" && \ curl -L ${URL} --output ${TEMP_PATH}/${APR_FILENAME} && \ tar xvfz "${TEMP_PATH}/${APR_FILENAME}" -C ${TEMP_PATH} && \ ls -la ${TEMP_PATH} && \ cd "${TEMP_PATH}/apr-${APR_VERSION}" && \ ./configure --prefix=/usr/local/apr && \ make && \ make install && \ # # Install Tomcat native # FILENAME="tomcat-native-${TOMCAT_NATIVE_VERSION}-src.tar.gz" && \ URL="https://archive.apache.org/dist/tomcat/tomcat-connectors/native/${TOMCAT_NATIVE_VERSION}/source/${FILENAME}" && \ curl -L ${URL} --output ${TEMP_PATH}/${FILENAME} && \ tar xvfz ${TEMP_PATH}/${FILENAME} -C ${TEMP_PATH} && \ cd "${TEMP_PATH}/tomcat-native-${TOMCAT_NATIVE_VERSION}-src/native" && \ ./configure --with-apr=/usr/local/apr && \ make && \ make install FROM sgrio/java:server_jre_8_ubuntu LABEL maintainer="info@redmic.es" ENV MARLIN_VERSION="0.9.3" \ TOMCAT_MAJOR="8" \ TOMCAT_VERSION="8.5.40" \ JAI_VERSION="1_1_3" \ IMAGE_IO_VERSION="1_1" \ GDAL_VERSION="2.2.3" \ TURBO_JPEG_VERSION="1.5.3" \ GEOSERVER_MAJOR_VERSION="2.14" \ GEOSERVER_MINOR_VERSION="3" \ CATALINA_HOME="/usr/local/tomcat" ENV GEOSERVER_HOME="${CATALINA_HOME}/webapps/geoserver" ENV GEOSERVER_PLUGINS="css inspire libjpeg-turbo csw wps pyramid vectortiles netcdf gdal netcdf-out ysld" \ GEOSERVER_COMMUNITY_PLUGINS="" \ GEOSERVER_VERSION="${GEOSERVER_MAJOR_VERSION}.${GEOSERVER_MINOR_VERSION}" \ GEOSERVER_DATA_DIR="/var/geoserver/data" \ GEOSERVER_LOG_DIR="/var/log/geoserver" \ GEOSERVER_LOG_LOCATION="${GEOSERVER_LOG_DIR}/geoserver.log" \ GEOSERVER_OPTS="-Djava.awt.headless=true \ -server \ -XX:PerfDataSamplingInterval=500 \ -Dorg.geotools.referencing.forceXY=true \ -XX:SoftRefLRUPolicyMSPerMB=36000 \ -XX:NewRatio=2 \ -XX:+CMSClassUnloadingEnabled \ -Djavax.servlet.request.encoding=UTF-8 \ -Djavax.servlet.response.encoding=UTF-8 \ -Dorg.geotools.shapefile.datetime=true \ -XX:+UnlockExperimentalVMOptions \ -XX:+AggressiveOpts \ -XX:+UseCGroupMemoryLimitForHeap \ -Xbootclasspath/a:${GEOSERVER_HOME}/WEB-INF/lib/marlin-${MARLIN_VERSION}-Unsafe.jar \ -Dsun.java2d.renderer=org.marlin.pisces.MarlinRenderingEngine \ -Djava.library.path=/usr/share/java:/opt/libjpeg-turbo/lib64:/usr/lib/jni:/usr/local/apr/lib:/usr/lib" \ GEOSERVER_PORT="8080" \ GOOGLE_FONTS="Open%20Sans Roboto Lato Ubuntu" \ NOTO_FONTS="NotoSans-unhinted NotoSerif-unhinted NotoMono-hinted" \ GDAL_DATA="/usr/share/gdal/2.2" \ TEMP_PATH="/tmp/resources" \ PATH="${CATALINA_HOME}/bin:${PATH}" COPY ./scripts / RUN mkdir -p "${TEMP_PATH}" "${GEOSERVER_DATA_DIR}" "${GEOSERVER_LOG_DIR}" "${CATALINA_HOME}" && \ cd ${CATALINA_HOME} && \ apt-get update && \ apt-get install -y --no-install-recommends \ fonts-cantarell \ fonts-lyx \ openssl \ unzip \ libtcnative-1 \ libgdal-java \ libgdal20 \ libnetcdf13 \ libnetcdf-c++4 \ netcdf-bin \ dnsutils \ locales && \ # # Install Google Noto fonts # mkdir -p /usr/share/fonts/truetype/noto && \ for FONT in ${NOTO_FONTS}; \ do \ curl -L https://noto-website-2.storage.googleapis.com/pkgs/${FONT}.zip --output ${TEMP_PATH}/${FONT}.zip && \ unzip -o ${TEMP_PATH}/${FONT}.zip -d /usr/share/fonts/truetype/noto ; \ done && \ # # Install Google Fonts # for FONT in ${GOOGLE_FONTS}; \ do \ mkdir -p /usr/share/fonts/truetype/${FONT} && \ curl -L "https://fonts.google.com/download?family=${FONT}" --output ${TEMP_PATH}/${FONT}.zip && \ unzip -o ${TEMP_PATH}/${FONT}.zip -d /usr/share/fonts/truetype/${FONT} ; \ done && \ # # Install Tomcat # URL="https://www.apache.org/dist/tomcat/tomcat-$TOMCAT_MAJOR/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz" && \ curl -fSL "${URL}" -o tomcat.tar.gz && \ if ! tar -xvf tomcat.tar.gz --strip-components=1 ; \ then \ exit 1; \ fi; \ rm bin/*.bat && \ rm tomcat.tar.gz* && \ rm -rf ${CATALINA_HOME}/webapps/* && \ # # Install GeoServer # FILENAME="geoserver-${GEOSERVER_VERSION}-war.zip" && \ URL="https://sourceforge.net/projects/geoserver/files/GeoServer/${GEOSERVER_VERSION}" && \ curl -L ${URL}/${FILENAME} -o ${TEMP_PATH}/${FILENAME} && \ if ! unzip -o ${TEMP_PATH}/${FILENAME} -d ${TEMP_PATH} ; \ then \ echo "Download failed - Filename: ${FILENAME}" && \ cat "${TEMP_PATH}/${FILENAME}" && \ exit 1; \ fi; \ unzip -o ${TEMP_PATH}/geoserver.war -d ${GEOSERVER_HOME} && \ mv /context.xml ${GEOSERVER_HOME}/META-INF/context.xml && \ rm -rf ${GEOSERVER_HOME}/data/coverages/* \ ${GEOSERVER_HOME}/data/data/* \ ${GEOSERVER_HOME}/data/demo/* \ ${GEOSERVER_HOME}/data/gwc-layers/* \ ${GEOSERVER_HOME}/data/layergroups/* \ ${GEOSERVER_HOME}/data/workspaces/* && \ # # Install Marlin # FILENAME=$(echo "marlin-${MARLIN_VERSION}-Unsafe.jar") && \ MARLIN_VERSION_DASH=$(echo "v${MARLIN_VERSION}" | tr "." "_") && \ URL="https://github.com/bourgesl/marlin-renderer/releases/download/${MARLIN_VERSION_DASH}/${FILENAME}" && \ curl -L ${URL} --output ${TEMP_PATH}/${FILENAME} && \ cp ${TEMP_PATH}/${FILENAME} ${GEOSERVER_HOME}/WEB-INF/lib && \ # # Install Turbo JPEG # TURBO_JPEG_FILENAME=$(echo "libjpeg-turbo-official_${TURBO_JPEG_VERSION}_amd64.deb") && \ URL="https://sourceforge.net/projects/libjpeg-turbo/files/${TURBO_JPEG_VERSION}/${TURBO_JPEG_FILENAME}" && \ curl -L ${URL} --output ${TEMP_PATH}/${TURBO_JPEG_FILENAME} && \ if ! dpkg -i ${TEMP_PATH}/${TURBO_JPEG_FILENAME} ; \ then \ echo "Download failed - Filename: ${TURBO_JPEG_FILENAME}" && \ cat "${TEMP_PATH}/${TURBO_JPEG_FILENAME}" && \ exit 1; \ fi; \ # # Install Image IO & JAI # mv /libs/jai/*.jar ${JRE_HOME}/lib/ext/ && \ mv /libs/jai/*.so ${JRE_HOME}/lib/amd64/ && \ # # Install GeoServer Plugins # URL="https://sourceforge.net/projects/geoserver/files/GeoServer/${GEOSERVER_VERSION}/extensions" && \ for PLUGIN in ${GEOSERVER_PLUGINS}; \ do \ FILENAME="geoserver-${GEOSERVER_VERSION}-${PLUGIN}-plugin.zip" && \ curl -L "${URL}/${FILENAME}" -o "${TEMP_PATH}/${FILENAME}" && \ if ! unzip -o "${TEMP_PATH}/${FILENAME}" -d "${GEOSERVER_HOME}/WEB-INF/lib/" ; \ then \ echo "Download failed - Filename: ${FILENAME}" && \ cat "${TEMP_PATH}/${FILENAME}" && \ exit 1; \ fi; \ done && \ # # Install GeoServer Community Plugins # URL="http://ares.opengeo.org/geoserver/master/community-latest/" && \ for PLUGIN in ${GEOSERVER_COMMUNITY_PLUGINS}; \ do \ FILENAME="geoserver-${GEOSERVER_MAJOR_VERSION}-SNAPSHOT-${PLUGIN}-plugin.zip" && \ curl -L ${URL}/${FILENAME} -o ${TEMP_PATH}/${FILENAME} && \ if ! unzip -o "${TEMP_PATH}/${FILENAME}" -d "${GEOSERVER_HOME}/WEB-INF/lib/" ; \ then \ echo "Download failed - Filename: ${FILENAME}" && \ cat "${TEMP_PATH}/${FILENAME}" && \ exit 1; \ fi; \ done && \ rm ${GEOSERVER_HOME}/WEB-INF/lib/imageio-ext-gdal-bindings-*.jar && \ ln -s /usr/share/java/gdal.jar \ "${GEOSERVER_HOME}/WEB-INF/lib/imageio-ext-gdal-bindings-${GDAL_VERSION}.jar" && \ # # Install strong cryptography # mkdir -p ${JAVA_HOME}/lib/security/ && \ mv /libs/policy/*.jar ${JAVA_HOME}/lib/security/ && \ # # Install locale sed -i -e 's/# es_ES.UTF-8 UTF-8/es_ES.UTF-8 UTF-8/' /etc/locale.gen && \ locale-gen && \ # # # Clean # rm -rf ${TEMP_PATH} && \ rm -rf /usr/share/doc/fonts-* && \ rm -rf /var/lib/apt/lists/* ENV LANG="es_ES.utf8" EXPOSE ${GEOSERVER_PORT} COPY --from=build_apr /usr/local/apr/lib /usr/local/apr/lib WORKDIR ${CATALINA_HOME} ENTRYPOINT ["/docker-entrypoint.sh"] CMD ["catalina.sh", "run"] deploy/.env +40 −6 Original line number Diff line number Diff line GEOSERVER_PORT=8080 GEOSERVER_USER=admin GEOSERVER_PASS=geoserver SLAVE_SERVICE_NAME=geoserver-slave SLAVES_MANAGEMENT_DELAY=180 SLAVES_MANAGEMENT_INTERVAL=1800 SLAVE_MANAGEMENT_TIMEOUT=300 BROKER_PORT=61616 GEOSERVER_DATA_DIR=/opt/geoserver/data_dir GEOWEBCACHE_CACHE_DIR=/opt/geoserver/gwc FOOTPRINTS_DATA_DIR=/opt/footprints_dir EXTRA_CONFIG_DIR=/settings GEOSERVER_ADMIN_USER=admin GEOSERVER_ADMIN_PASSWORD=changeme STABLE_EXTENSIONS=css-plugin,inspire-plugin,csw-plugin,netcdf-plugin,netcdf-out-plugin,ysld-plugin COMMUNITY_EXTENSIONS=jms-cluster-plugin CLUSTERING=true CLUSTER_DURABILITY=false TOMCAT_EXTRAS=false GEOSERVER_LABEL_COLOR=white GEOSERVER_LABEL_BACKGROUND=black GEOSERVER_SUBDOMAIN=atlas DEV_MASTER_INITIAL_MEMORY=1G DEV_MASTER_MAXIMUM_MEMORY=2G DEV_NODE_INITIAL_MEMORY=1G DEV_NODE_MAXIMUM_MEMORY=2G PRO_MASTER_INITIAL_MEMORY=1500M PRO_MASTER_MAXIMUM_MEMORY=2500G PRO_NODE_INITIAL_MEMORY=1500M PRO_NODE_MAXIMUM_MEMORY=2500G POSTGRES_USER=geowebcache POSTGRES_PASSWORD=changeme POSTGRES_DB=gwc PGDATA=/var/lib/postgresql/data POSTGRES_INITDB_WALDIR=/var/lib/postgresql/wal VOL_TYPE=nfs4 VOL_ADDR=127.0.0.1 VOL_OPTIONS=rw,nolock,noatime,tcp,rsize=8192,wsize=8192,timeo=14 GEOSERVER_DATA_VOL_NAME=geoserver-data-vol CACHE_VOL_NAME=geoserver-cache-vol FONTS_VOL_NAME=geoserver-fonts-vol FOOTPRINTS_VOL_NAME=geoserver-footprints-vol POSTGRES_DATA_VOL_NAME=postgres-gwc-data-vol WAL_VOL_NAME=postgres-gwc-wal-vol Loading
.gitlab-ci.yml +3 −116 Original line number Diff line number Diff line include: - project: 'redmic-project/gitlab-ci-templates' ref: master file: '/packaging.yml' - project: 'redmic-project/gitlab-ci-templates' ref: master file: '/_deployment.yml' file: '/deployment.yml' stages: - package - test-package - deploy variables: STACK: gis .deploy: variables: SERVICES_TO_CHECK: ${STACK}_${SERVICE_NAME} script: - > deploy.sh IMAGE_NAME=${IMAGE_NAME} IMAGE_TAG=${IMAGE_TAG} COMPOSE_FILE=${COMPOSE_FILE} GEOSERVER_ADMIN_SUBDOMAIN=${GEOSERVER_ADMIN_SUBDOMAIN} GEOSERVER_SUBDOMAIN=${GEOSERVER_SUBDOMAIN} PUBLIC_HOSTNAME=${PUBLIC_HOSTNAME} GEOSERVER_PASS=${GEOSERVER_PASS} environment: url: https://${GEOSERVER_ADMIN_SUBDOMAIN}.${PUBLIC_HOSTNAME} .deploy-development: variables: COMPOSE_FILE: docker-compose.${SERVICE_NAME}.tmpl.yml:docker-compose.${SERVICE_NAME}.dev.yml environment: name: dev/${SERVICE_NAME} .deploy-production: variables: COMPOSE_FILE: docker-compose.${SERVICE_NAME}.tmpl.yml:docker-compose.${SERVICE_NAME}.prod.yml STACK: gis environment: name: pro/${SERVICE_NAME} .deploy-geoserver-master: variables: &deploy-geoserver-master SERVICE_NAME: geoserver-master .deploy-geoserver-slave: variables: &deploy-geoserver-slave SERVICE_NAME: geoserver-slave .deploy-geoserver-master-development: extends: .deploy-development variables: *deploy-geoserver-master .deploy-geoserver-slave-development: extends: .deploy-development variables: *deploy-geoserver-slave .deploy-geoserver-master-production: extends: .deploy-production variables: *deploy-geoserver-master .deploy-geoserver-slave-production: extends: .deploy-production variables: *deploy-geoserver-slave deploy-geoserver-master-support-branch-development: extends: .deploy-geoserver-master-development only: - branches except: - master - schedules deploy-geoserver-slave-support-branch-development: extends: .deploy-geoserver-slave-development only: - branches except: - master - schedules deploy-geoserver-master-stable-branch-development: extends: .deploy-geoserver-master-development only: - master except: - schedules deploy-geoserver-slave-stable-branch-development: extends: .deploy-geoserver-slave-development only: - master except: - schedules deploy-geoserver-master-stable-branch-production: extends: .deploy-geoserver-master-production only: - master except: - schedules deploy-geoserver-slave-stable-branch-production: extends: .deploy-geoserver-slave-production only: - master except: - schedules deploy-geoserver-master-version-development: extends: .deploy-geoserver-master-development only: - tags deploy-geoserver-slave-version-development: extends: .deploy-geoserver-slave-development only: - tags deploy-geoserver-master-version-production: extends: .deploy-geoserver-master-production only: - tags deploy-geoserver-slave-version-production: extends: .deploy-geoserver-slave-production only: - tags No newline at end of file url: https://${GEOSERVER_SUBDOMAIN}.${PUBLIC_HOSTNAME}
Dockerfiledeleted 100644 → 0 +0 −239 Original line number Diff line number Diff line FROM sgrio/java:jdk_8_ubuntu AS build_apr ENV APR_VERSION="1.6.5" \ TOMCAT_NATIVE_VERSION="1.2.18" \ TEMP_PATH="/tmp/resources" RUN apt-get update && \ apt-get install -y --no-install-recommends \ build-essential \ openssl \ libssl-dev \ curl && \ rm -rf /var/lib/apt/lists/* && \ mkdir -p "${TEMP_PATH}" && \ # # Install APR # APR_FILENAME="apr-${APR_VERSION}.tar.gz" && \ URL="http://www.us.apache.org/dist/apr/${APR_FILENAME}" && \ curl -L ${URL} --output ${TEMP_PATH}/${APR_FILENAME} && \ tar xvfz "${TEMP_PATH}/${APR_FILENAME}" -C ${TEMP_PATH} && \ ls -la ${TEMP_PATH} && \ cd "${TEMP_PATH}/apr-${APR_VERSION}" && \ ./configure --prefix=/usr/local/apr && \ make && \ make install && \ # # Install Tomcat native # FILENAME="tomcat-native-${TOMCAT_NATIVE_VERSION}-src.tar.gz" && \ URL="https://archive.apache.org/dist/tomcat/tomcat-connectors/native/${TOMCAT_NATIVE_VERSION}/source/${FILENAME}" && \ curl -L ${URL} --output ${TEMP_PATH}/${FILENAME} && \ tar xvfz ${TEMP_PATH}/${FILENAME} -C ${TEMP_PATH} && \ cd "${TEMP_PATH}/tomcat-native-${TOMCAT_NATIVE_VERSION}-src/native" && \ ./configure --with-apr=/usr/local/apr && \ make && \ make install FROM sgrio/java:server_jre_8_ubuntu LABEL maintainer="info@redmic.es" ENV MARLIN_VERSION="0.9.3" \ TOMCAT_MAJOR="8" \ TOMCAT_VERSION="8.5.40" \ JAI_VERSION="1_1_3" \ IMAGE_IO_VERSION="1_1" \ GDAL_VERSION="2.2.3" \ TURBO_JPEG_VERSION="1.5.3" \ GEOSERVER_MAJOR_VERSION="2.14" \ GEOSERVER_MINOR_VERSION="3" \ CATALINA_HOME="/usr/local/tomcat" ENV GEOSERVER_HOME="${CATALINA_HOME}/webapps/geoserver" ENV GEOSERVER_PLUGINS="css inspire libjpeg-turbo csw wps pyramid vectortiles netcdf gdal netcdf-out ysld" \ GEOSERVER_COMMUNITY_PLUGINS="" \ GEOSERVER_VERSION="${GEOSERVER_MAJOR_VERSION}.${GEOSERVER_MINOR_VERSION}" \ GEOSERVER_DATA_DIR="/var/geoserver/data" \ GEOSERVER_LOG_DIR="/var/log/geoserver" \ GEOSERVER_LOG_LOCATION="${GEOSERVER_LOG_DIR}/geoserver.log" \ GEOSERVER_OPTS="-Djava.awt.headless=true \ -server \ -XX:PerfDataSamplingInterval=500 \ -Dorg.geotools.referencing.forceXY=true \ -XX:SoftRefLRUPolicyMSPerMB=36000 \ -XX:NewRatio=2 \ -XX:+CMSClassUnloadingEnabled \ -Djavax.servlet.request.encoding=UTF-8 \ -Djavax.servlet.response.encoding=UTF-8 \ -Dorg.geotools.shapefile.datetime=true \ -XX:+UnlockExperimentalVMOptions \ -XX:+AggressiveOpts \ -XX:+UseCGroupMemoryLimitForHeap \ -Xbootclasspath/a:${GEOSERVER_HOME}/WEB-INF/lib/marlin-${MARLIN_VERSION}-Unsafe.jar \ -Dsun.java2d.renderer=org.marlin.pisces.MarlinRenderingEngine \ -Djava.library.path=/usr/share/java:/opt/libjpeg-turbo/lib64:/usr/lib/jni:/usr/local/apr/lib:/usr/lib" \ GEOSERVER_PORT="8080" \ GOOGLE_FONTS="Open%20Sans Roboto Lato Ubuntu" \ NOTO_FONTS="NotoSans-unhinted NotoSerif-unhinted NotoMono-hinted" \ GDAL_DATA="/usr/share/gdal/2.2" \ TEMP_PATH="/tmp/resources" \ PATH="${CATALINA_HOME}/bin:${PATH}" COPY ./scripts / RUN mkdir -p "${TEMP_PATH}" "${GEOSERVER_DATA_DIR}" "${GEOSERVER_LOG_DIR}" "${CATALINA_HOME}" && \ cd ${CATALINA_HOME} && \ apt-get update && \ apt-get install -y --no-install-recommends \ fonts-cantarell \ fonts-lyx \ openssl \ unzip \ libtcnative-1 \ libgdal-java \ libgdal20 \ libnetcdf13 \ libnetcdf-c++4 \ netcdf-bin \ dnsutils \ locales && \ # # Install Google Noto fonts # mkdir -p /usr/share/fonts/truetype/noto && \ for FONT in ${NOTO_FONTS}; \ do \ curl -L https://noto-website-2.storage.googleapis.com/pkgs/${FONT}.zip --output ${TEMP_PATH}/${FONT}.zip && \ unzip -o ${TEMP_PATH}/${FONT}.zip -d /usr/share/fonts/truetype/noto ; \ done && \ # # Install Google Fonts # for FONT in ${GOOGLE_FONTS}; \ do \ mkdir -p /usr/share/fonts/truetype/${FONT} && \ curl -L "https://fonts.google.com/download?family=${FONT}" --output ${TEMP_PATH}/${FONT}.zip && \ unzip -o ${TEMP_PATH}/${FONT}.zip -d /usr/share/fonts/truetype/${FONT} ; \ done && \ # # Install Tomcat # URL="https://www.apache.org/dist/tomcat/tomcat-$TOMCAT_MAJOR/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz" && \ curl -fSL "${URL}" -o tomcat.tar.gz && \ if ! tar -xvf tomcat.tar.gz --strip-components=1 ; \ then \ exit 1; \ fi; \ rm bin/*.bat && \ rm tomcat.tar.gz* && \ rm -rf ${CATALINA_HOME}/webapps/* && \ # # Install GeoServer # FILENAME="geoserver-${GEOSERVER_VERSION}-war.zip" && \ URL="https://sourceforge.net/projects/geoserver/files/GeoServer/${GEOSERVER_VERSION}" && \ curl -L ${URL}/${FILENAME} -o ${TEMP_PATH}/${FILENAME} && \ if ! unzip -o ${TEMP_PATH}/${FILENAME} -d ${TEMP_PATH} ; \ then \ echo "Download failed - Filename: ${FILENAME}" && \ cat "${TEMP_PATH}/${FILENAME}" && \ exit 1; \ fi; \ unzip -o ${TEMP_PATH}/geoserver.war -d ${GEOSERVER_HOME} && \ mv /context.xml ${GEOSERVER_HOME}/META-INF/context.xml && \ rm -rf ${GEOSERVER_HOME}/data/coverages/* \ ${GEOSERVER_HOME}/data/data/* \ ${GEOSERVER_HOME}/data/demo/* \ ${GEOSERVER_HOME}/data/gwc-layers/* \ ${GEOSERVER_HOME}/data/layergroups/* \ ${GEOSERVER_HOME}/data/workspaces/* && \ # # Install Marlin # FILENAME=$(echo "marlin-${MARLIN_VERSION}-Unsafe.jar") && \ MARLIN_VERSION_DASH=$(echo "v${MARLIN_VERSION}" | tr "." "_") && \ URL="https://github.com/bourgesl/marlin-renderer/releases/download/${MARLIN_VERSION_DASH}/${FILENAME}" && \ curl -L ${URL} --output ${TEMP_PATH}/${FILENAME} && \ cp ${TEMP_PATH}/${FILENAME} ${GEOSERVER_HOME}/WEB-INF/lib && \ # # Install Turbo JPEG # TURBO_JPEG_FILENAME=$(echo "libjpeg-turbo-official_${TURBO_JPEG_VERSION}_amd64.deb") && \ URL="https://sourceforge.net/projects/libjpeg-turbo/files/${TURBO_JPEG_VERSION}/${TURBO_JPEG_FILENAME}" && \ curl -L ${URL} --output ${TEMP_PATH}/${TURBO_JPEG_FILENAME} && \ if ! dpkg -i ${TEMP_PATH}/${TURBO_JPEG_FILENAME} ; \ then \ echo "Download failed - Filename: ${TURBO_JPEG_FILENAME}" && \ cat "${TEMP_PATH}/${TURBO_JPEG_FILENAME}" && \ exit 1; \ fi; \ # # Install Image IO & JAI # mv /libs/jai/*.jar ${JRE_HOME}/lib/ext/ && \ mv /libs/jai/*.so ${JRE_HOME}/lib/amd64/ && \ # # Install GeoServer Plugins # URL="https://sourceforge.net/projects/geoserver/files/GeoServer/${GEOSERVER_VERSION}/extensions" && \ for PLUGIN in ${GEOSERVER_PLUGINS}; \ do \ FILENAME="geoserver-${GEOSERVER_VERSION}-${PLUGIN}-plugin.zip" && \ curl -L "${URL}/${FILENAME}" -o "${TEMP_PATH}/${FILENAME}" && \ if ! unzip -o "${TEMP_PATH}/${FILENAME}" -d "${GEOSERVER_HOME}/WEB-INF/lib/" ; \ then \ echo "Download failed - Filename: ${FILENAME}" && \ cat "${TEMP_PATH}/${FILENAME}" && \ exit 1; \ fi; \ done && \ # # Install GeoServer Community Plugins # URL="http://ares.opengeo.org/geoserver/master/community-latest/" && \ for PLUGIN in ${GEOSERVER_COMMUNITY_PLUGINS}; \ do \ FILENAME="geoserver-${GEOSERVER_MAJOR_VERSION}-SNAPSHOT-${PLUGIN}-plugin.zip" && \ curl -L ${URL}/${FILENAME} -o ${TEMP_PATH}/${FILENAME} && \ if ! unzip -o "${TEMP_PATH}/${FILENAME}" -d "${GEOSERVER_HOME}/WEB-INF/lib/" ; \ then \ echo "Download failed - Filename: ${FILENAME}" && \ cat "${TEMP_PATH}/${FILENAME}" && \ exit 1; \ fi; \ done && \ rm ${GEOSERVER_HOME}/WEB-INF/lib/imageio-ext-gdal-bindings-*.jar && \ ln -s /usr/share/java/gdal.jar \ "${GEOSERVER_HOME}/WEB-INF/lib/imageio-ext-gdal-bindings-${GDAL_VERSION}.jar" && \ # # Install strong cryptography # mkdir -p ${JAVA_HOME}/lib/security/ && \ mv /libs/policy/*.jar ${JAVA_HOME}/lib/security/ && \ # # Install locale sed -i -e 's/# es_ES.UTF-8 UTF-8/es_ES.UTF-8 UTF-8/' /etc/locale.gen && \ locale-gen && \ # # # Clean # rm -rf ${TEMP_PATH} && \ rm -rf /usr/share/doc/fonts-* && \ rm -rf /var/lib/apt/lists/* ENV LANG="es_ES.utf8" EXPOSE ${GEOSERVER_PORT} COPY --from=build_apr /usr/local/apr/lib /usr/local/apr/lib WORKDIR ${CATALINA_HOME} ENTRYPOINT ["/docker-entrypoint.sh"] CMD ["catalina.sh", "run"]
deploy/.env +40 −6 Original line number Diff line number Diff line GEOSERVER_PORT=8080 GEOSERVER_USER=admin GEOSERVER_PASS=geoserver SLAVE_SERVICE_NAME=geoserver-slave SLAVES_MANAGEMENT_DELAY=180 SLAVES_MANAGEMENT_INTERVAL=1800 SLAVE_MANAGEMENT_TIMEOUT=300 BROKER_PORT=61616 GEOSERVER_DATA_DIR=/opt/geoserver/data_dir GEOWEBCACHE_CACHE_DIR=/opt/geoserver/gwc FOOTPRINTS_DATA_DIR=/opt/footprints_dir EXTRA_CONFIG_DIR=/settings GEOSERVER_ADMIN_USER=admin GEOSERVER_ADMIN_PASSWORD=changeme STABLE_EXTENSIONS=css-plugin,inspire-plugin,csw-plugin,netcdf-plugin,netcdf-out-plugin,ysld-plugin COMMUNITY_EXTENSIONS=jms-cluster-plugin CLUSTERING=true CLUSTER_DURABILITY=false TOMCAT_EXTRAS=false GEOSERVER_LABEL_COLOR=white GEOSERVER_LABEL_BACKGROUND=black GEOSERVER_SUBDOMAIN=atlas DEV_MASTER_INITIAL_MEMORY=1G DEV_MASTER_MAXIMUM_MEMORY=2G DEV_NODE_INITIAL_MEMORY=1G DEV_NODE_MAXIMUM_MEMORY=2G PRO_MASTER_INITIAL_MEMORY=1500M PRO_MASTER_MAXIMUM_MEMORY=2500G PRO_NODE_INITIAL_MEMORY=1500M PRO_NODE_MAXIMUM_MEMORY=2500G POSTGRES_USER=geowebcache POSTGRES_PASSWORD=changeme POSTGRES_DB=gwc PGDATA=/var/lib/postgresql/data POSTGRES_INITDB_WALDIR=/var/lib/postgresql/wal VOL_TYPE=nfs4 VOL_ADDR=127.0.0.1 VOL_OPTIONS=rw,nolock,noatime,tcp,rsize=8192,wsize=8192,timeo=14 GEOSERVER_DATA_VOL_NAME=geoserver-data-vol CACHE_VOL_NAME=geoserver-cache-vol FONTS_VOL_NAME=geoserver-fonts-vol FOOTPRINTS_VOL_NAME=geoserver-footprints-vol POSTGRES_DATA_VOL_NAME=postgres-gwc-data-vol WAL_VOL_NAME=postgres-gwc-wal-vol