From 9f117779441f0e4d35fda05dc2f257856af30306 Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Thu, 14 Nov 2024 09:56:59 +0100 Subject: [PATCH 01/95] feat: Upgrade to CKAN 2.11.0 official Docker image --- sddi-base/Dockerfile | 376 ++++++++++++++++++++++++++++--------------- 1 file changed, 244 insertions(+), 132 deletions(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index 5e0614c1..a0af5d4e 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -1,16 +1,32 @@ ############################################################################### -# Build stage +# Extbuild stage ############################################################################### -ARG CKAN_VERSION_BUILD_STAGE=2.9.9-dev -ARG CKAN_VERSION_BUILD_SPATIAL=2.9.9-focal -ARG CKAN_VERSION_RUNTIME_STAGE=2.9.9-focal - -FROM ckan/ckan-base:${CKAN_VERSION_BUILD_STAGE} as extbuild +FROM ckan/ckan-base:2.11 as extbuild USER root +RUN apt-get update && apt-get install -y \ + git \ + curl \ + libpq-dev \ + gcc \ + make \ + g++ \ + autoconf \ + automake \ + libtool \ + patch \ + musl-dev \ + libpcre3-dev \ + libpcre3 \ + libffi-dev \ + libxml2-dev \ + libxslt-dev + +RUN pip install -U markupsafe==2.0.1 sqlalchemy==1.4.41 + # ckanext-hierarchy ########################################################### -ARG CKANEXT_HIERARCHY_VERSION="v1.2.0" +ARG CKANEXT_HIERARCHY_VERSION="abb4e2d" ENV CKANEXT_HIERARCHY_VERSION=${CKANEXT_HIERARCHY_VERSION} RUN set -ex && \ @@ -23,21 +39,15 @@ RUN set -ex && \ curl -o /wheels/ckanext-hierarchy.txt https://raw.githubusercontent.com/ckan/ckanext-hierarchy/${CKANEXT_HIERARCHY_VERSION}/requirements.txt && \ ls -lah /wheels -# ckanext-grouphierarchy ###################################################### -ARG CKANEXT_SDDI_VERSION="1.1.4" -ENV CKANEXT_SDDI_VERSION=${CKANEXT_SDDI_VERSION} +# ckanext-envvars +ENV ENVVARS_GIT_URL=https://github.com/ckan/ckanext-envvars/ +ENV ENVVARS_GIT_BRANCH=v0.0.6 RUN set -ex && \ - pip wheel --wheel-dir=/wheels \ - git+https://github.com/tum-gis/ckanext-grouphierarchy-sddi.git@${CKANEXT_SDDI_VERSION}#egg=ckanext-grouphierarchy && \ - pip wheel --wheel-dir=/wheels -r \ - https://raw.githubusercontent.com/tum-gis/ckanext-grouphierarchy-sddi/${CKANEXT_SDDI_VERSION}/requirements.txt && \ - curl -o /wheels/ckanext-grouphierarchy.txt \ - https://raw.githubusercontent.com/tum-gis/ckanext-grouphierarchy-sddi/${CKANEXT_SDDI_VERSION}/requirements.txt && \ - ls -lah /wheels + pip3 wheel --wheel-dir=/wheels git+${ENVVARS_GIT_URL}@${ENVVARS_GIT_BRANCH}#egg=ckanext-envvars # ckanext-relation ############################################################ -ARG CKANEXT_RELATION_VERSION="1.0.3" +ARG CKANEXT_RELATION_VERSION="1.1.0" ENV CKANEXT_RELATION_VERSION=${CKANEXT_RELATION_VERSION} RUN set -ex && \ @@ -50,16 +60,16 @@ RUN set -ex && \ ls -lah /wheels # ckanext-scheming ############################################################ -ARG CKANEXT_SCHEMING_VERSION="f98daec" +ARG CKANEXT_SCHEMING_VERSION="27035f4" ENV CKANEXT_SCHEMING_VERSION=${CKANEXT_SCHEMING_VERSION} -ENV CKANEXT_SCHEMING_GITHUB_URL="https://github.com/MarijaKnezevic/ckanext-scheming" +ENV CKANEXT_SCHEMING_GITHUB_URL="https://github.com//ckan/ckanext-scheming" RUN set -ex && \ pip wheel --wheel-dir=/wheels \ git+${CKANEXT_SCHEMING_GITHUB_URL}.git@${CKANEXT_SCHEMING_VERSION}#egg=ckanext-scheming # ckanext datesearch ########################################################## -ARG CKANEXT_DATESEARCH_VERSION="1.0.2" +ARG CKANEXT_DATESEARCH_VERSION="1.1.0" ENV CKANEXT_DATESEARCH_VERSION=${CKANEXT_DATESEARCH_VERSION} ENV CKANEXT_DATESEARCH_VERSION_GITHUB_URL="https://github.com/MarijaKnezevic/ckanext-datesearch" @@ -67,134 +77,176 @@ RUN set -ex && \ pip wheel --wheel-dir=/wheels \ git+${CKANEXT_DATESEARCH_VERSION_GITHUB_URL}.git@${CKANEXT_DATESEARCH_VERSION}#egg=ckanext-datesearch -# ckanext-composite ########################################################### -ARG CKANEXT_COMPOSITE_VERSION="1e6d7bb" -ENV CKANEXT_COMPOSITE_VERSION=${CKANEXT_COMPOSITE_VERSION} -ENV CKANEXT_COMPOSITE_GITHUB_URL="https://github.com/EnviDat/ckanext-composite" +# ckanext-harvest ########################################################### +ARG CKANEXT_HARVEST_VERSION="v1.6.0" +ENV CKANEXT_HARVEST_VERSION=${CKANEXT_HARVEST_VERSION} +ENV CKANEXT_HARVEST_GITHUB_URL="https://github.com/ckan/ckanext-harvest.git" RUN set -ex && \ - pip install -r \ - https://raw.githubusercontent.com/EnviDat/ckanext-composite/${CKANEXT_COMPOSITE_VERSION}/dev-requirements.txt && \ - pip wheel --wheel-dir=/wheels \ - git+${CKANEXT_COMPOSITE_GITHUB_URL}.git@${CKANEXT_COMPOSITE_VERSION}#egg=ckanext-composite - -# ckanext-repeating ########################################################### -ARG CKANEXT_REPEATING_VERSION="1.0.0" -ENV CKANEXT_REPEATING_VERSION=${CKANEXT_REPEATING_VERSION} -ENV CKANEXT_REPEATING_GITHUB_URL="https://github.com/MarijaKnezevic/ckanext-repeating" + mkdir -p /wheels && \ + pip install -r https://raw.githubusercontent.com/ckan/ckanext-harvest/${CKANEXT_HARVEST_VERSION}/requirements.txt RUN set -ex && \ - pip wheel --wheel-dir=/wheels \ - git+${CKANEXT_REPEATING_GITHUB_URL}.git@${CKANEXT_REPEATING_VERSION}#egg=ckanext-repeating + pip wheel --wheel-dir=/wheels -r https://raw.githubusercontent.com/ckan/ckanext-harvest/${CKANEXT_HARVEST_VERSION}/requirements.txt && \ + pip wheel --wheel-dir=/wheels git+https://github.com/ckan/ckanext-harvest.git@${CKANEXT_HARVEST_VERSION}#egg=ckanext-harvest && \ + curl -o /wheels/ckanext-harvest.txt https://raw.githubusercontent.com/ckan/ckanext-harvest/${CKANEXT_HARVEST_VERSION}/requirements.txt && \ + ls -lah /wheels -# ckanext-clamav ############################################################## -ARG CKANEXT_CALMAV_VERSION="master" -ENV CKANEXT_CALMAV_VERSION=${CKANEXT_CALMAV_VERSION} -ENV CKANEXT_CALMAV_GITHUB_URL="https://github.com/mutantsan/ckanext-clamav" +# ckanext-spatial ############################################################# +ENV CKANEXT_SPATIAL_GITHUB_URL="https://github.com/ckan/ckanext-spatial" +ENV CKANEXT_SPATIAL_VERSION="8a00a2b" RUN set -ex && \ - pip wheel --wheel-dir=/wheels -r \ - https://raw.githubusercontent.com/mutantsan/ckanext-clamav/${CKANEXT_CALMAV_VERSION}/requirements.txt && \ - curl -o /wheels/ckanext-clamav.txt \ - https://raw.githubusercontent.com/mutantsan/ckanext-clamav/${CKANEXT_CALMAV_VERSION}/requirements.txt && \ + curl -o /wheels/ckanext-spatial-requirements.txt \ + https://raw.githubusercontent.com/ckan/ckanext-spatial/${CKANEXT_SPATIAL_VERSION}/requirements-py2.txt && \ pip wheel --wheel-dir=/wheels \ - git+${CKANEXT_CALMAV_GITHUB_URL}.git@${CKANEXT_CALMAV_VERSION}#egg=ckanext-clamav + git+${CKANEXT_SPATIAL_GITHUB_URL}.git@${CKANEXT_SPATIAL_VERSION}#egg=ckanext-spatial -# ckanext-password-policy ##################################################### -ARG CKANEXT_PASSWORD_POLICY_VERSION="5618dc9" -ENV CKANEXT_PASSWORD_POLICY_VERSION=${CKANEXT_PASSWORD_POLICY_VERSION} -ENV CKANEXT_PASSWORD_POLICY_GITHUB_URL="https://github.com/keitaroinc/ckanext-password-policy" +# ckanext-geoview ############################################################# +ARG CKANEXT_GEOVIEW_VERSION="v0.2.2" +ENV CKANEXT_GEOVIEW_VERSION=${CKANEXT_GEOVIEW_VERSION} +ENV CKANEXT_GEOVIEW_GITHUB_URL="https://github.com/ckan/ckanext-geoview" RUN set -ex && \ - pip install -r \ - https://raw.githubusercontent.com/keitaroinc/ckanext-password-policy/${CKANEXT_PASSWORD_POLICY_VERSION}/requirements.txt && \ - curl -o /wheels/ckanext-password-policy.txt \ - https://raw.githubusercontent.com/keitaroinc/ckanext-password-policy/${CKANEXT_PASSWORD_POLICY_VERSION}/requirements.txt && \ - pip wheel --wheel-dir=/wheels \ - git+${CKANEXT_PASSWORD_POLICY_GITHUB_URL}.git@${CKANEXT_PASSWORD_POLICY_VERSION}#egg=ckanext-password-policy + curl -o /wheels/ckanext-geoview-dev-requirements.txt \ + ${CKANEXT_GEOVIEW_GITHUB_URL}/raw/${CKANEXT_GEOVIEW_VERSION}/dev-requirements.txt && \ + pip install -r /wheels/ckanext-geoview-dev-requirements.txt && \ + pip wheel --wheel-dir=/wheels \ + git+${CKANEXT_GEOVIEW_GITHUB_URL}.git@${CKANEXT_GEOVIEW_VERSION}#egg=ckanext-geoview -# ckanext-spatial ############################################################# -FROM ghcr.io/keitaroinc/ckan:${CKAN_VERSION_BUILD_SPATIAL} as extbuild-spatial +# ckanext-theme-sddi ############################################################# +ARG CKANEXT_THEME_SDDI_VERSION="0.0.1" +ENV CKANEXT_THEME_SDDI_VERSION=${CKANEXT_THEME_SDDI_VERSION} +ENV CKANEXT_THEME_SDDI_GITHUB_URL="https://github.com/MarijaKnezevic/ckanext-theme-sddi" -ARG CKANEXT_SPATIAL_VERSION="c2118b9" -ENV CKANEXT_SPATIAL_VERSION=${CKANEXT_SPATIAL_VERSION} +RUN set -ex && \ + curl -o /wheels/ckanext-theme-sddi-dev-requirements.txt \ + ${CKANEXT_THEME_SDDI_GITHUB_URL}/raw/${CKANEXT_THEME_SDDI_VERSION}/requirements.txt && \ + pip install -r /wheels/ckanext-theme-sddi-dev-requirements.txt && \ + pip wheel --wheel-dir=/wheels \ + git+${CKANEXT_THEME_SDDI_GITHUB_URL}.git@${CKANEXT_THEME_SDDI_VERSION}#egg=ckanext-theme-sddi -USER root +# ckanext-clamav ############################################################# +ARG CKANEXT_CLAMAV_VERSION="a1d23ac" +ENV CKANEXT_CLAMAV_VERSION=${CKANEXT_CLAMAV_VERSION} +ENV CKANEXT_CLAMAV_GITHUB_URL="https://github.com/DataShades/ckanext-clamav" -# Install any system packages necessary to build extensions RUN set -ex && \ - apt-get update && \ - apt-get install -y --no-install-recommends \ - python3-dev python3-pip libxml2-dev libxslt1-dev libgeos-c1v5 python-is-python3 && \ - mkdir -p /wheels && \ - pip install -U pip + curl -o /wheels/ckanext-clamav-requirements.txt \ + ${CKANEXT_CLAMAV_GITHUB_URL}/raw/${CKANEXT_CLAMAV_VERSION}/requirements.txt && \ + pip install -r /wheels/ckanext-clamav-requirements.txt && \ + pip wheel --wheel-dir=/wheels \ + git+${CKANEXT_CLAMAV_GITHUB_URL}.git@${CKANEXT_CLAMAV_VERSION}#egg=ckanext-clamav -RUN set -ex && \ - pip install -r https://raw.githubusercontent.com/MarijaKnezevic/ckanext-spatial/${CKANEXT_SPATIAL_VERSION}/requirements.txt && \ - curl -o /wheels/ckanext-spatial.txt \ - https://raw.githubusercontent.com/MarijaKnezevic/ckanext-spatial/${CKANEXT_SPATIAL_VERSION}/requirements.txt && \ - pip install -r https://raw.githubusercontent.com/MarijaKnezevic/ckanext-spatial/${CKANEXT_SPATIAL_VERSION}/requirements-postgis.txt && \ - curl -o /wheels/ckanext-spatial-postgis.txt \ - https://raw.githubusercontent.com/MarijaKnezevic/ckanext-spatial/${CKANEXT_SPATIAL_VERSION}/requirements-postgis.txt && \ - ls -lah /wheels +# ckanext-dcat ########################################################## +ARG CKANEXT_DCAT_VERSION="v1.5.1" +ENV CKANEXT_DCAT_VERSION=${CKANEXT_DCAT_VERSION} +ENV CKANEXT_DCAT_GITHUB_URL="https://github.com/ckan/ckanext-dcat" RUN set -ex && \ - pip wheel --wheel-dir=/wheels \ - git+https://github.com/MarijaKnezevic/ckanext-spatial.git@${CKANEXT_SPATIAL_VERSION}#egg=ckanext-spatial + curl -o /wheels/ckanext-dcat-requirements.txt \ + https://raw.githubusercontent.com/ckan/ckanext-dcat/${CKANEXT_DCAT_VERSION}/requirements.txt && \ + pip install -r /wheels/ckanext-dcat-requirements.txt && \ + pip wheel --wheel-dir=/wheels \ + git+${CKANEXT_DCAT_GITHUB_URL}.git@${CKANEXT_DCAT_VERSION}#egg=ckanext-dcat + +# ckanext-security ###################################################### +ARG CKANEXT_SECURITY_VERSION="80dc1d6" +ENV CKANEXT_SECURITY_VERSION=${CKANEXT_SECURITY_VERSION} +ENV CKANEXT_SECURITY_GITHUB_URL="https://github.com/MarijaKnezevic/ckanext-security" + +RUN set -ex && \ + curl -o /wheels/ckanext-security-requirements.txt \ + https://raw.githubusercontent.com/MarijaKnezevic/ckanext-security/${CKANEXT_SECURITY_VERSION}/requirements.txt && \ + pip install -r /wheels/ckanext-security-requirements.txt && \ + pip wheel --wheel-dir=/wheels \ + git+${CKANEXT_SECURITY_GITHUB_URL}.git@${CKANEXT_SECURITY_VERSION}#egg=ckanext-security ############################################################################### # Runtime stage ############################################################################### -FROM ghcr.io/keitaroinc/ckan:${CKAN_VERSION_RUNTIME_STAGE} as runtime - -ENV CKAN__PLUGINS "image_view text_view recline_view webpage_view datastore datapusher \ - hierarchy_display hierarchy_form display_group relation \ - spatial_metadata spatial_query datesearch repeating composite scheming_datasets \ - password_policy clamav \ - envvars" - -# Extra env for compatibility with ckan/base Docker images for downstream k8s +FROM ckan/ckan-base:2.11 + +ENV APP_DIR=/srv/app +ENV SRC_DIR=/srv/app/src +ENV CKAN_DIR=${SRC_DIR}/ckan +ENV DATA_DIR=/srv/app/data +ENV PIP_SRC=${SRC_DIR} + +# Setting the locale +ENV LC_ALL="en_US.UTF-8" +RUN apt-get update && apt-get install --no-install-recommends -y locales +RUN sed -i "/$LC_ALL/s/^# //g" /etc/locale.gen +RUN dpkg-reconfigure --frontend=noninteractive locales +RUN update-locale LANG=${LC_ALL} + +# Set timezone +RUN echo "UTC" > /etc/timezone ENV CKAN_INI=${APP_DIR}/production.ini ENV CKAN_STORAGE_PATH=/var/lib/ckan -ENV TZ="UTC" -USER root +# Update the package lists and install required packages +RUN apt-get update && apt-get install -y \ + bash \ + git \ + gettext \ + curl \ + wget \ + unzip \ + postgresql-client \ + libmagic1 \ + libpcre3 \ + libxslt1.1 \ + libxml2 \ + tzdata \ + apache2-utils \ + musl-dev \ + libssl-dev \ + proj-bin \ + libproj-dev \ + proj-data \ + python3-cffi \ + uwsgi-plugin-python3 \ + supervisor + +# Cleanup to reduce image size +RUN apt-get clean && rm -rf /var/lib/apt/lists/* + +RUN set -ex pip install markupsafe==2.0.1 \ + setuptools \ + wheel \ + sqlalchemy==1.4.41 \ + gevent==22.10.2 \ + greenlet==2.0.1 + +# Create SRC_DIR +RUN mkdir -p ${SRC_DIR} && \ + # Link python to python3 + ln -s /usr/bin/python3 /usr/bin/python + +# Get artifacts from build stages +COPY --from=extbuild /wheels ${APP_DIR}/ext_wheels -# Install any system packages necessary to build extensions -RUN set -ex && \ - apt-get update && \ - apt-get install -y --no-install-recommends \ - clamav \ - clamav-daemon \ - libxml2-dev libxslt1-dev libgeos-c1v5 && \ - pip install --no-cache-dir -U pip && \ - rm -rf /var/lib/apt/lists/* +WORKDIR ${CKAN_DIR} -# Copy python wheels from build stage -COPY --from=extbuild /wheels ${APP_DIR}/ext_wheels -COPY --from=extbuild-spatial /wheels ${APP_DIR}/ext_wheels +# ckanext-harvest ########################################################### +RUN set -ex && \ + pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-harvest && \ + pip install --no-index --find-links=${APP_DIR}/ext_wheels -r ${APP_DIR}/ext_wheels/ckanext-harvest.txt # ckanext-hierarchy ########################################################### RUN set -ex && \ pip install --find-links=${APP_DIR}/ext_wheels -r ${APP_DIR}/ext_wheels/ckanext-hierarchy.txt && \ pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-hierarchy -# ckanext-grouphierarchy ###################################################### +# ckanext-envvars ############################################################ RUN set -ex && \ - pip install --find-links=${APP_DIR}/ext_wheels -r ${APP_DIR}/ext_wheels/ckanext-grouphierarchy.txt && \ - pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-grouphierarchy + pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-envvars # ckanext-relation ############################################################ RUN set -ex && \ - pip install --find-links=${APP_DIR}/ext_wheels -r ${APP_DIR}/ext_wheels/ckanext-relation.txt && \ pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-relation -# ckanext-spatial ############################################################# -RUN set -ex && \ - pip install -r ${APP_DIR}/ext_wheels/ckanext-spatial.txt && \ - pip install -r ${APP_DIR}/ext_wheels/ckanext-spatial-postgis.txt && \ - pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-spatial - # ckanext-scheming ############################################################ RUN set -ex && \ pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-scheming @@ -203,48 +255,108 @@ RUN set -ex && \ RUN set -ex && \ pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-datesearch -# ckanext-composite ########################################################### +# ckanext-spatial ############################################################# RUN set -ex && \ - pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-composite + pip3 install -e 'git+https://github.com/ckan/ckanext-spatial.git#egg=ckanext-spatial' && \ + pip3 install -r 'https://raw.githubusercontent.com/ckan/ckanext-spatial/master/requirements.txt' -# ckanext-repeating ########################################################### +# ckanext-geoview ############################################################# RUN set -ex && \ - pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-repeating - -# ckanext-clamav ############################################################## + pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-geoview + +# ckanext-scheme-sddi ############################################################ +RUN set -ex && \ + pip install -e "git+https://github.com/MarijaKnezevic/ckanext-scheme-sddi@0.0.1#egg=ckanext-scheme-sddi" + +# ckanext-theme-sddi ############################################################# +RUN set -ex && \ + pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-theme-sddi + +# ckanext-heroslideradmin ############################################################# +RUN set -ex && \ + pip install -e "git+https://github.com/dathere/ckanext-heroslideradmin.git@4b60e00#egg=ckanext-heroslideradmin" + +# ckanext-clamav ############################################################# RUN set -ex && \ - pip install -r ${APP_DIR}/ext_wheels/ckanext-clamav.txt && \ pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-clamav - -# ckanext-password-policy ##################################################### + +# ckanext-fortify ############################## +RUN set -ex && \ + pip install -e "git+https://github.com/salsadigitalauorg/ckanext-fortify#egg=ckanext-fortify" + +# ckanext-dcat ########################################################## RUN set -ex && \ - pip install -r ${APP_DIR}/ext_wheels/ckanext-password-policy.txt && \ - pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-password-policy + pip install --find-links=${APP_DIR}/ext_wheels -r ${APP_DIR}/ext_wheels/ckanext-dcat-requirements.txt && \ + pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-dcat -# Copy init scripts and additional files -COPY --chown=ckan:ckan initScripts/ ${APP_DIR}/docker-afterinit.d -COPY --chown=ckan:ckan who.ini ${APP_DIR}/who.ini +# ckanext-security ###################################################### +RUN set -ex && \ + pip install --find-links=${APP_DIR}/ext_wheels -r ${APP_DIR}/ext_wheels/ckanext-security-requirements.txt && \ + pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-security + +ENV CKAN__PLUGINS "envvars image_view text_view webpage_view datastore \ + harvest ckan_harvester \ + hierarchy_display hierarchy_form \ + relation \ + spatial_metadata spatial_query \ + datesearch \ + scheme_sddi \ + theme_sddi \ + scheming_datasets \ + geo_view geojson_view wmts_view shp_view \ + fortify \ + security \ + heroslideradmin \ + dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface \ + clamav" + +RUN set -ex && \ + ckan generate config ${APP_DIR}/production.ini RUN set -ex && \ ckan config-tool "${CKAN_INI}" "ckan.plugins = ${CKAN__PLUGINS}" && \ ckan config-tool "${CKAN_INI}" "ckan.spatial.srid = 4326" && \ ckan config-tool "${CKAN_INI}" "ckanext.spatial.search_backend = solr-bbox" && \ - ckan config-tool "${CKAN_INI}" "scheming.dataset_schemas = ckanext.scheming:ckan_dataset.yaml" && \ - ckan config-tool "${CKAN_INI}" "scheming.presets = ckanext.scheming:presets.json ckanext.repeating:presets.json ckanext.composite:presets.json" && \ + ckan config-tool "${CKAN_INI}" "ckanext.spatial.use_postgis_sorting = true" && \ + ckan config-tool "${CKAN_INI}" "scheming.dataset_schemas = ckanext.scheme_sddi:sddi_dataset.yaml" && \ + ckan config-tool "${CKAN_INI}" "scheming.presets = ckanext.scheming:presets.json ckanext.scheme_sddi:sddi_presets.json" && \ ckan config-tool "${CKAN_INI}" "scheming.dataset_fallback = false" && \ - ckan config-tool "${CKAN_INI}" "licenses_group_url = https://raw.githubusercontent.com/tum-gis/ckanext-grouphierarchy-sddi/main/ckanext/grouphierarchy/licenses_SDDI.json" && \ - ckan config-tool "${CKAN_INI}" "ckanext.password_policy.password_length = 12" && \ - ckan config-tool "${CKAN_INI}" "ckanext.password_policy.failed_logins = 3" && \ - ckan config-tool "${CKAN_INI}" "ckanext.password_policy.user_locked_time = 600" && \ + ckan config-tool "${CKAN_INI}" "ckanext.dathere_theme.column_count = 4" && \ ckan config-tool "${CKAN_INI}" "ckanext.spatial.common_map.type = custom" && \ ckan config-tool "${CKAN_INI}" "ckanext.spatial.common_map.custom.url = https://tile.openstreetmap.de/{z}/{x}/{y}.png" && \ ckan config-tool "${CKAN_INI}" "ckanext.spatial.common_map.attribution = OpenStreetMap contributors." && \ - ckan config-tool "${CKAN_INI}" "who.timeout = 1800" && \ - ckan config-tool "${CKAN_INI}" "ckan.auth.public_user_details = False" && \ + ckan config-tool "${CKAN_INI}" "ckanext.security.lock_timeout = 900" && \ + ckan config-tool "${CKAN_INI}" "ckanext.security.login_max_count = 3" && \ + ckan config-tool "${CKAN_INI}" "ckanext.security.brute_force_key = user_name" && \ + ckan config-tool "${CKAN_INI}" "ckanext.security.disable_password_reset_override = true" && \ + ckan config-tool "${CKAN_INI}" "ckanext.security.enable_totp = false" && \ + ckan config-tool "${CKAN_INI}" "ckan.fortify.enable_password_policy = True" && \ + ckan config-tool "${CKAN_INI}" "ckan.fortify.password_policy.min_length = 12" && \ + ckan config-tool "${CKAN_INI}" "ckan.fortify.check_parent_org_allowed = True" && \ + ckan config-tool "${CKAN_INI}" "ckanext.dcat.enable_content_negotiation = True" && \ + ckan config-tool "${CKAN_INI}" "ckan.harvest.log_scope = 0" && \ + ckan config-tool "${CKAN_INI}" "ckan.harvest.log_level = debug" && \ + ckan config-tool "${CKAN_INI}" "ckan.harvest.log_timeframe = 10" && \ + ckan config-tool "${CKAN_INI}" "PERMANENT_SESSION_LIFETIME = 600" && \ echo "${TZ}" > /etc/timezone && \ mkdir -p ${CKAN_STORAGE_PATH} && \ chown -R ckan:ckan ${APP_DIR} ${CKAN_STORAGE_PATH} && \ # Remove wheels rm -rf ${APP_DIR}/ext_wheels -USER ckan +WORKDIR ${APP_DIR} + +ENV UWSGI_HARAKIRI=50 + +# Create local storage folder +RUN mkdir -p ${CKAN_STORAGE_PATH} && \ + chown -R ckan:ckan ${CKAN_STORAGE_PATH} + +# Create entrypoint directory for children image scripts +ONBUILD RUN mkdir /docker-entrypoint.d + +EXPOSE 5000 + +HEALTHCHECK --interval=60s --timeout=5s --retries=5 CMD curl --fail http://localhost:5000/api/3/action/status_show || exit CMD ["/srv/app/start_ckan.sh"] + +CMD ["/srv/app/start_ckan.sh"] \ No newline at end of file From 6330f996adefb8554a9ecc59cc4a935ec855c260 Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Fri, 15 Nov 2024 10:38:49 +0100 Subject: [PATCH 02/95] Temporary removed locale installation --- sddi-base/Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index a0af5d4e..bac74e1b 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -174,11 +174,11 @@ ENV DATA_DIR=/srv/app/data ENV PIP_SRC=${SRC_DIR} # Setting the locale -ENV LC_ALL="en_US.UTF-8" -RUN apt-get update && apt-get install --no-install-recommends -y locales -RUN sed -i "/$LC_ALL/s/^# //g" /etc/locale.gen -RUN dpkg-reconfigure --frontend=noninteractive locales -RUN update-locale LANG=${LC_ALL} +# ENV LC_ALL="en_US.UTF-8" +# RUN apt-get update && apt-get install --no-install-recommends -y locales +# RUN sed -i "/$LC_ALL/s/^# //g" /etc/locale.gen +# RUN dpkg-reconfigure --frontend=noninteractive locales +# RUN update-locale LANG=${LC_ALL} # Set timezone RUN echo "UTC" > /etc/timezone From 7a66113e4feeee018795fde7c652a382da5cdc25 Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Mon, 18 Nov 2024 11:44:29 +0100 Subject: [PATCH 03/95] Changing permissions for apt install --- sddi-base/Dockerfile | 58 +++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index bac74e1b..c19428ef 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -172,18 +172,21 @@ ENV SRC_DIR=/srv/app/src ENV CKAN_DIR=${SRC_DIR}/ckan ENV DATA_DIR=/srv/app/data ENV PIP_SRC=${SRC_DIR} +ENV CKAN_INI=${APP_DIR}/production.ini +ENV CKAN_STORAGE_PATH=/var/lib/ckan +ENV UWSGI_HARAKIRI=50 + +USER root # Setting the locale -# ENV LC_ALL="en_US.UTF-8" -# RUN apt-get update && apt-get install --no-install-recommends -y locales -# RUN sed -i "/$LC_ALL/s/^# //g" /etc/locale.gen -# RUN dpkg-reconfigure --frontend=noninteractive locales -# RUN update-locale LANG=${LC_ALL} +ENV LC_ALL="en_US.UTF-8" +RUN apt-get update && apt-get install --no-install-recommends -y locales +RUN sed -i "/$LC_ALL/s/^# //g" /etc/locale.gen +RUN dpkg-reconfigure --frontend=noninteractive locales +RUN update-locale LANG=${LC_ALL} # Set timezone -RUN echo "UTC" > /etc/timezone -ENV CKAN_INI=${APP_DIR}/production.ini -ENV CKAN_STORAGE_PATH=/var/lib/ckan +RUN echo "UTC" > /etc/timezone # Update the package lists and install required packages RUN apt-get update && apt-get install -y \ @@ -207,18 +210,12 @@ RUN apt-get update && apt-get install -y \ proj-data \ python3-cffi \ uwsgi-plugin-python3 \ - supervisor + supervisor \ + sudo # Cleanup to reduce image size RUN apt-get clean && rm -rf /var/lib/apt/lists/* -RUN set -ex pip install markupsafe==2.0.1 \ - setuptools \ - wheel \ - sqlalchemy==1.4.41 \ - gevent==22.10.2 \ - greenlet==2.0.1 - # Create SRC_DIR RUN mkdir -p ${SRC_DIR} && \ # Link python to python3 @@ -227,6 +224,20 @@ RUN mkdir -p ${SRC_DIR} && \ # Get artifacts from build stages COPY --from=extbuild /wheels ${APP_DIR}/ext_wheels +# Create local storage folder +RUN mkdir -p ${CKAN_STORAGE_PATH} && \ + chown -R ckan:ckan ${CKAN_STORAGE_PATH} && \ + chown -R ckan:ckan ${APP_DIR} + +USER ckan + +RUN set -ex pip install markupsafe==2.0.1 \ + setuptools \ + wheel \ + sqlalchemy==1.4.41 \ + gevent==22.10.2 \ + greenlet==2.0.1 + WORKDIR ${CKAN_DIR} # ckanext-harvest ########################################################### @@ -337,21 +348,14 @@ RUN set -ex && \ ckan config-tool "${CKAN_INI}" "ckan.harvest.log_scope = 0" && \ ckan config-tool "${CKAN_INI}" "ckan.harvest.log_level = debug" && \ ckan config-tool "${CKAN_INI}" "ckan.harvest.log_timeframe = 10" && \ - ckan config-tool "${CKAN_INI}" "PERMANENT_SESSION_LIFETIME = 600" && \ - echo "${TZ}" > /etc/timezone && \ - mkdir -p ${CKAN_STORAGE_PATH} && \ - chown -R ckan:ckan ${APP_DIR} ${CKAN_STORAGE_PATH} && \ - # Remove wheels + ckan config-tool "${CKAN_INI}" "PERMANENT_SESSION_LIFETIME = 600" + +# Remove wheels +RUN set -ex && \ rm -rf ${APP_DIR}/ext_wheels WORKDIR ${APP_DIR} -ENV UWSGI_HARAKIRI=50 - -# Create local storage folder -RUN mkdir -p ${CKAN_STORAGE_PATH} && \ - chown -R ckan:ckan ${CKAN_STORAGE_PATH} - # Create entrypoint directory for children image scripts ONBUILD RUN mkdir /docker-entrypoint.d From 8dab8af790e4ad9ad269bd3e1afd096fe998757a Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Mon, 18 Nov 2024 15:56:14 +0100 Subject: [PATCH 04/95] Fix ckan group name --- sddi-base/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index c19428ef..8f338218 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -226,8 +226,8 @@ COPY --from=extbuild /wheels ${APP_DIR}/ext_wheels # Create local storage folder RUN mkdir -p ${CKAN_STORAGE_PATH} && \ - chown -R ckan:ckan ${CKAN_STORAGE_PATH} && \ - chown -R ckan:ckan ${APP_DIR} + chown -R ckan:ckan-sys ${CKAN_STORAGE_PATH} && \ + chown -R ckan:ckan-sys ${APP_DIR} USER ckan From d4f80dffe3a0a5f5f16c561e842440dc963bd5ed Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Fri, 22 Nov 2024 11:03:21 +0100 Subject: [PATCH 05/95] Update version for spatial extension --- sddi-base/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index 8f338218..02e335e0 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -94,7 +94,7 @@ RUN set -ex && \ # ckanext-spatial ############################################################# ENV CKANEXT_SPATIAL_GITHUB_URL="https://github.com/ckan/ckanext-spatial" -ENV CKANEXT_SPATIAL_VERSION="8a00a2b" +ENV CKANEXT_SPATIAL_VERSION="v2.2.0" RUN set -ex && \ curl -o /wheels/ckanext-spatial-requirements.txt \ From 49bfe7f58efa9507ceeeb4cd7561196152d6e927 Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Thu, 12 Dec 2024 17:23:45 +0100 Subject: [PATCH 06/95] Upgrade to CKAN 2.11.1 official Docker image --- sddi-base/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index 02e335e0..77541001 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -1,7 +1,7 @@ ############################################################################### # Extbuild stage ############################################################################### -FROM ckan/ckan-base:2.11 as extbuild +FROM ckan/ckan-base:2.11.1 as extbuild USER root @@ -165,7 +165,7 @@ RUN set -ex && \ ############################################################################### # Runtime stage ############################################################################### -FROM ckan/ckan-base:2.11 +FROM ckan/ckan-base:2.11.1 ENV APP_DIR=/srv/app ENV SRC_DIR=/srv/app/src From a99ce51e9ecc737ee487a4b658c6d2d180d28e11 Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Mon, 16 Dec 2024 12:25:45 +0100 Subject: [PATCH 07/95] Added activity plugin --- sddi-base/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index 77541001..430ffeec 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -306,6 +306,7 @@ RUN set -ex && \ pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-security ENV CKAN__PLUGINS "envvars image_view text_view webpage_view datastore \ + activity \ harvest ckan_harvester \ hierarchy_display hierarchy_form \ relation \ From 7d9deb238dfead9facbd51fcabdcea581bd9d50d Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Thu, 9 Jan 2025 11:50:23 +0100 Subject: [PATCH 08/95] Updated ckanext-harvest extension to use update-manifest branch --- sddi-base/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index 430ffeec..172a7d65 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -78,7 +78,7 @@ RUN set -ex && \ git+${CKANEXT_DATESEARCH_VERSION_GITHUB_URL}.git@${CKANEXT_DATESEARCH_VERSION}#egg=ckanext-datesearch # ckanext-harvest ########################################################### -ARG CKANEXT_HARVEST_VERSION="v1.6.0" +ARG CKANEXT_HARVEST_VERSION="update-manifest" ENV CKANEXT_HARVEST_VERSION=${CKANEXT_HARVEST_VERSION} ENV CKANEXT_HARVEST_GITHUB_URL="https://github.com/ckan/ckanext-harvest.git" From d9a9670d45aadf87842e84a0e3d414f70b9e59b0 Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Mon, 13 Jan 2025 12:54:36 +0100 Subject: [PATCH 09/95] Updated sddi themes version --- sddi-base/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index 172a7d65..00275aab 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -115,7 +115,7 @@ RUN set -ex && \ git+${CKANEXT_GEOVIEW_GITHUB_URL}.git@${CKANEXT_GEOVIEW_VERSION}#egg=ckanext-geoview # ckanext-theme-sddi ############################################################# -ARG CKANEXT_THEME_SDDI_VERSION="0.0.1" +ARG CKANEXT_THEME_SDDI_VERSION="main" ENV CKANEXT_THEME_SDDI_VERSION=${CKANEXT_THEME_SDDI_VERSION} ENV CKANEXT_THEME_SDDI_GITHUB_URL="https://github.com/MarijaKnezevic/ckanext-theme-sddi" From c10ce5874b141acdfb5a2fa64b27e01c4e3baaed Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Mon, 13 Jan 2025 15:41:54 +0100 Subject: [PATCH 10/95] Removed fortify extension from Dockerfile --- sddi-base/Dockerfile | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index 00275aab..65988661 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -291,10 +291,6 @@ RUN set -ex && \ RUN set -ex && \ pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-clamav -# ckanext-fortify ############################## -RUN set -ex && \ - pip install -e "git+https://github.com/salsadigitalauorg/ckanext-fortify#egg=ckanext-fortify" - # ckanext-dcat ########################################################## RUN set -ex && \ pip install --find-links=${APP_DIR}/ext_wheels -r ${APP_DIR}/ext_wheels/ckanext-dcat-requirements.txt && \ @@ -316,7 +312,6 @@ ENV CKAN__PLUGINS "envvars image_view text_view webpage_view datastore \ theme_sddi \ scheming_datasets \ geo_view geojson_view wmts_view shp_view \ - fortify \ security \ heroslideradmin \ dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface \ @@ -342,9 +337,6 @@ RUN set -ex && \ ckan config-tool "${CKAN_INI}" "ckanext.security.brute_force_key = user_name" && \ ckan config-tool "${CKAN_INI}" "ckanext.security.disable_password_reset_override = true" && \ ckan config-tool "${CKAN_INI}" "ckanext.security.enable_totp = false" && \ - ckan config-tool "${CKAN_INI}" "ckan.fortify.enable_password_policy = True" && \ - ckan config-tool "${CKAN_INI}" "ckan.fortify.password_policy.min_length = 12" && \ - ckan config-tool "${CKAN_INI}" "ckan.fortify.check_parent_org_allowed = True" && \ ckan config-tool "${CKAN_INI}" "ckanext.dcat.enable_content_negotiation = True" && \ ckan config-tool "${CKAN_INI}" "ckan.harvest.log_scope = 0" && \ ckan config-tool "${CKAN_INI}" "ckan.harvest.log_level = debug" && \ From 2541f45561406a89f1552d3cb2ff13cfbcb25ca1 Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Tue, 14 Jan 2025 09:49:59 +0100 Subject: [PATCH 11/95] Updated CKAN auth configurations --- sddi-base/Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index 65988661..4c48dafd 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -341,8 +341,10 @@ RUN set -ex && \ ckan config-tool "${CKAN_INI}" "ckan.harvest.log_scope = 0" && \ ckan config-tool "${CKAN_INI}" "ckan.harvest.log_level = debug" && \ ckan config-tool "${CKAN_INI}" "ckan.harvest.log_timeframe = 10" && \ - ckan config-tool "${CKAN_INI}" "PERMANENT_SESSION_LIFETIME = 600" - + ckan config-tool "${CKAN_INI}" "PERMANENT_SESSION_LIFETIME = 600" && \ + ckan config-tool "${CKAN_INI}" "ckan.auth.create_user_via_api = false" && \ + ckan config-tool "${CKAN_INI}" "ckan.auth.create_user_via_web = false" + # Remove wheels RUN set -ex && \ rm -rf ${APP_DIR}/ext_wheels From 57f60141f211adec0f999af8bf294a4aeef5f569 Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Tue, 14 Jan 2025 11:48:05 +0100 Subject: [PATCH 12/95] Removed user creation configuration settings and updated harvest extension version --- sddi-base/Dockerfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index 4c48dafd..af0c47ac 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -78,7 +78,7 @@ RUN set -ex && \ git+${CKANEXT_DATESEARCH_VERSION_GITHUB_URL}.git@${CKANEXT_DATESEARCH_VERSION}#egg=ckanext-datesearch # ckanext-harvest ########################################################### -ARG CKANEXT_HARVEST_VERSION="update-manifest" +ARG CKANEXT_HARVEST_VERSION="v1.6.1" ENV CKANEXT_HARVEST_VERSION=${CKANEXT_HARVEST_VERSION} ENV CKANEXT_HARVEST_GITHUB_URL="https://github.com/ckan/ckanext-harvest.git" @@ -341,9 +341,7 @@ RUN set -ex && \ ckan config-tool "${CKAN_INI}" "ckan.harvest.log_scope = 0" && \ ckan config-tool "${CKAN_INI}" "ckan.harvest.log_level = debug" && \ ckan config-tool "${CKAN_INI}" "ckan.harvest.log_timeframe = 10" && \ - ckan config-tool "${CKAN_INI}" "PERMANENT_SESSION_LIFETIME = 600" && \ - ckan config-tool "${CKAN_INI}" "ckan.auth.create_user_via_api = false" && \ - ckan config-tool "${CKAN_INI}" "ckan.auth.create_user_via_web = false" + ckan config-tool "${CKAN_INI}" "PERMANENT_SESSION_LIFETIME = 600" # Remove wheels RUN set -ex && \ From 7bd958cdfe45a3f355a92b8f2a92a0622259ae4c Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Wed, 15 Jan 2025 15:14:22 +0100 Subject: [PATCH 13/95] Temporarily disabled harvest plugin and updated datesearch version --- sddi-base/Dockerfile | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index af0c47ac..b343e9cd 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -69,7 +69,7 @@ RUN set -ex && \ git+${CKANEXT_SCHEMING_GITHUB_URL}.git@${CKANEXT_SCHEMING_VERSION}#egg=ckanext-scheming # ckanext datesearch ########################################################## -ARG CKANEXT_DATESEARCH_VERSION="1.1.0" +ARG CKANEXT_DATESEARCH_VERSION="master" ENV CKANEXT_DATESEARCH_VERSION=${CKANEXT_DATESEARCH_VERSION} ENV CKANEXT_DATESEARCH_VERSION_GITHUB_URL="https://github.com/MarijaKnezevic/ckanext-datesearch" @@ -78,19 +78,19 @@ RUN set -ex && \ git+${CKANEXT_DATESEARCH_VERSION_GITHUB_URL}.git@${CKANEXT_DATESEARCH_VERSION}#egg=ckanext-datesearch # ckanext-harvest ########################################################### -ARG CKANEXT_HARVEST_VERSION="v1.6.1" -ENV CKANEXT_HARVEST_VERSION=${CKANEXT_HARVEST_VERSION} -ENV CKANEXT_HARVEST_GITHUB_URL="https://github.com/ckan/ckanext-harvest.git" +# ARG CKANEXT_HARVEST_VERSION="v1.6.1" +# ENV CKANEXT_HARVEST_VERSION=${CKANEXT_HARVEST_VERSION} +# ENV CKANEXT_HARVEST_GITHUB_URL="https://github.com/ckan/ckanext-harvest.git" -RUN set -ex && \ - mkdir -p /wheels && \ - pip install -r https://raw.githubusercontent.com/ckan/ckanext-harvest/${CKANEXT_HARVEST_VERSION}/requirements.txt +# RUN set -ex && \ +# mkdir -p /wheels && \ +# pip install -r https://raw.githubusercontent.com/ckan/ckanext-harvest/${CKANEXT_HARVEST_VERSION}/requirements.txt -RUN set -ex && \ - pip wheel --wheel-dir=/wheels -r https://raw.githubusercontent.com/ckan/ckanext-harvest/${CKANEXT_HARVEST_VERSION}/requirements.txt && \ - pip wheel --wheel-dir=/wheels git+https://github.com/ckan/ckanext-harvest.git@${CKANEXT_HARVEST_VERSION}#egg=ckanext-harvest && \ - curl -o /wheels/ckanext-harvest.txt https://raw.githubusercontent.com/ckan/ckanext-harvest/${CKANEXT_HARVEST_VERSION}/requirements.txt && \ - ls -lah /wheels +# RUN set -ex && \ +# pip wheel --wheel-dir=/wheels -r https://raw.githubusercontent.com/ckan/ckanext-harvest/${CKANEXT_HARVEST_VERSION}/requirements.txt && \ +# pip wheel --wheel-dir=/wheels git+https://github.com/ckan/ckanext-harvest.git@${CKANEXT_HARVEST_VERSION}#egg=ckanext-harvest && \ +# curl -o /wheels/ckanext-harvest.txt https://raw.githubusercontent.com/ckan/ckanext-harvest/${CKANEXT_HARVEST_VERSION}/requirements.txt && \ +# ls -lah /wheels # ckanext-spatial ############################################################# ENV CKANEXT_SPATIAL_GITHUB_URL="https://github.com/ckan/ckanext-spatial" @@ -241,9 +241,9 @@ RUN set -ex pip install markupsafe==2.0.1 \ WORKDIR ${CKAN_DIR} # ckanext-harvest ########################################################### -RUN set -ex && \ - pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-harvest && \ - pip install --no-index --find-links=${APP_DIR}/ext_wheels -r ${APP_DIR}/ext_wheels/ckanext-harvest.txt +# RUN set -ex && \ +# pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-harvest && \ +# pip install --no-index --find-links=${APP_DIR}/ext_wheels -r ${APP_DIR}/ext_wheels/ckanext-harvest.txt # ckanext-hierarchy ########################################################### RUN set -ex && \ @@ -303,7 +303,7 @@ RUN set -ex && \ ENV CKAN__PLUGINS "envvars image_view text_view webpage_view datastore \ activity \ - harvest ckan_harvester \ + # harvest ckan_harvester \ hierarchy_display hierarchy_form \ relation \ spatial_metadata spatial_query \ @@ -338,9 +338,9 @@ RUN set -ex && \ ckan config-tool "${CKAN_INI}" "ckanext.security.disable_password_reset_override = true" && \ ckan config-tool "${CKAN_INI}" "ckanext.security.enable_totp = false" && \ ckan config-tool "${CKAN_INI}" "ckanext.dcat.enable_content_negotiation = True" && \ - ckan config-tool "${CKAN_INI}" "ckan.harvest.log_scope = 0" && \ - ckan config-tool "${CKAN_INI}" "ckan.harvest.log_level = debug" && \ - ckan config-tool "${CKAN_INI}" "ckan.harvest.log_timeframe = 10" && \ +# ckan config-tool "${CKAN_INI}" "ckan.harvest.log_scope = 0" && \ +# ckan config-tool "${CKAN_INI}" "ckan.harvest.log_level = debug" && \ +# ckan config-tool "${CKAN_INI}" "ckan.harvest.log_timeframe = 10" && \ ckan config-tool "${CKAN_INI}" "PERMANENT_SESSION_LIFETIME = 600" # Remove wheels From 475c681f083520042e77fdc9ebbc9d39558a30d9 Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Wed, 15 Jan 2025 15:37:03 +0100 Subject: [PATCH 14/95] Temporarily disabled dcat harvesters --- sddi-base/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index b343e9cd..6021763d 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -314,7 +314,7 @@ ENV CKAN__PLUGINS "envvars image_view text_view webpage_view datastore \ geo_view geojson_view wmts_view shp_view \ security \ heroslideradmin \ - dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface \ + # dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface \ clamav" RUN set -ex && \ From efcca3962bef7d8a97cfbd618f6a05a5fe29798d Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Tue, 21 Jan 2025 16:02:36 +0100 Subject: [PATCH 15/95] Updated sddi-theme extension version --- sddi-base/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index 6021763d..2b37c244 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -115,7 +115,7 @@ RUN set -ex && \ git+${CKANEXT_GEOVIEW_GITHUB_URL}.git@${CKANEXT_GEOVIEW_VERSION}#egg=ckanext-geoview # ckanext-theme-sddi ############################################################# -ARG CKANEXT_THEME_SDDI_VERSION="main" +ARG CKANEXT_THEME_SDDI_VERSION="update-manifest" ENV CKANEXT_THEME_SDDI_VERSION=${CKANEXT_THEME_SDDI_VERSION} ENV CKANEXT_THEME_SDDI_GITHUB_URL="https://github.com/MarijaKnezevic/ckanext-theme-sddi" From 816dc9a25e628f67a28b37a84d027b3f80176d15 Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Tue, 21 Jan 2025 16:33:49 +0100 Subject: [PATCH 16/95] Revert sddi-theme extension changes to previous version --- sddi-base/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index 2b37c244..6021763d 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -115,7 +115,7 @@ RUN set -ex && \ git+${CKANEXT_GEOVIEW_GITHUB_URL}.git@${CKANEXT_GEOVIEW_VERSION}#egg=ckanext-geoview # ckanext-theme-sddi ############################################################# -ARG CKANEXT_THEME_SDDI_VERSION="update-manifest" +ARG CKANEXT_THEME_SDDI_VERSION="main" ENV CKANEXT_THEME_SDDI_VERSION=${CKANEXT_THEME_SDDI_VERSION} ENV CKANEXT_THEME_SDDI_GITHUB_URL="https://github.com/MarijaKnezevic/ckanext-theme-sddi" From 8fc8e266e60a3a80e7b68f0ff6eab5e84ec73d59 Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Tue, 21 Jan 2025 17:27:31 +0100 Subject: [PATCH 17/95] Add theme-sddi build trigger --- sddi-base/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index 6021763d..1506b0ec 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -114,6 +114,7 @@ RUN set -ex && \ pip wheel --wheel-dir=/wheels \ git+${CKANEXT_GEOVIEW_GITHUB_URL}.git@${CKANEXT_GEOVIEW_VERSION}#egg=ckanext-geoview +# Trigger sddi build # ckanext-theme-sddi ############################################################# ARG CKANEXT_THEME_SDDI_VERSION="main" ENV CKANEXT_THEME_SDDI_VERSION=${CKANEXT_THEME_SDDI_VERSION} From 3a78c469e9dc42defa6cb2a935c09a39c96c515c Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Thu, 23 Jan 2025 16:51:13 +0100 Subject: [PATCH 18/95] Updated extensions version and enable TOTP security --- sddi-base/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index 1506b0ec..c20aec2f 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -69,7 +69,7 @@ RUN set -ex && \ git+${CKANEXT_SCHEMING_GITHUB_URL}.git@${CKANEXT_SCHEMING_VERSION}#egg=ckanext-scheming # ckanext datesearch ########################################################## -ARG CKANEXT_DATESEARCH_VERSION="master" +ARG CKANEXT_DATESEARCH_VERSION="1.1.1" ENV CKANEXT_DATESEARCH_VERSION=${CKANEXT_DATESEARCH_VERSION} ENV CKANEXT_DATESEARCH_VERSION_GITHUB_URL="https://github.com/MarijaKnezevic/ckanext-datesearch" @@ -116,7 +116,7 @@ RUN set -ex && \ # Trigger sddi build # ckanext-theme-sddi ############################################################# -ARG CKANEXT_THEME_SDDI_VERSION="main" +ARG CKANEXT_THEME_SDDI_VERSION="0.0.2" ENV CKANEXT_THEME_SDDI_VERSION=${CKANEXT_THEME_SDDI_VERSION} ENV CKANEXT_THEME_SDDI_GITHUB_URL="https://github.com/MarijaKnezevic/ckanext-theme-sddi" @@ -337,7 +337,7 @@ RUN set -ex && \ ckan config-tool "${CKAN_INI}" "ckanext.security.login_max_count = 3" && \ ckan config-tool "${CKAN_INI}" "ckanext.security.brute_force_key = user_name" && \ ckan config-tool "${CKAN_INI}" "ckanext.security.disable_password_reset_override = true" && \ - ckan config-tool "${CKAN_INI}" "ckanext.security.enable_totp = false" && \ + ckan config-tool "${CKAN_INI}" "ckanext.security.enable_totp = true" && \ ckan config-tool "${CKAN_INI}" "ckanext.dcat.enable_content_negotiation = True" && \ # ckan config-tool "${CKAN_INI}" "ckan.harvest.log_scope = 0" && \ # ckan config-tool "${CKAN_INI}" "ckan.harvest.log_level = debug" && \ From da5713043bfbf34c531a6e0f62893084013bb619 Mon Sep 17 00:00:00 2001 From: Ilche Bedelovski Date: Sat, 25 Jan 2025 17:10:00 +0100 Subject: [PATCH 19/95] Enable dcat and revert totp to false --- sddi-base/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index c20aec2f..6292381a 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -316,6 +316,7 @@ ENV CKAN__PLUGINS "envvars image_view text_view webpage_view datastore \ security \ heroslideradmin \ # dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface \ + dcat dcat_json_interface \ clamav" RUN set -ex && \ @@ -337,7 +338,7 @@ RUN set -ex && \ ckan config-tool "${CKAN_INI}" "ckanext.security.login_max_count = 3" && \ ckan config-tool "${CKAN_INI}" "ckanext.security.brute_force_key = user_name" && \ ckan config-tool "${CKAN_INI}" "ckanext.security.disable_password_reset_override = true" && \ - ckan config-tool "${CKAN_INI}" "ckanext.security.enable_totp = true" && \ + ckan config-tool "${CKAN_INI}" "ckanext.security.enable_totp = false" && \ ckan config-tool "${CKAN_INI}" "ckanext.dcat.enable_content_negotiation = True" && \ # ckan config-tool "${CKAN_INI}" "ckan.harvest.log_scope = 0" && \ # ckan config-tool "${CKAN_INI}" "ckan.harvest.log_level = debug" && \ From 014aa0f46f57485ce9cf802614fc695956ad1671 Mon Sep 17 00:00:00 2001 From: Ilche Bedelovski Date: Sat, 25 Jan 2025 17:46:00 +0100 Subject: [PATCH 20/95] CKAN security from a feature branch --- sddi-base/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index 6292381a..2cf9cfde 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -152,7 +152,7 @@ RUN set -ex && \ git+${CKANEXT_DCAT_GITHUB_URL}.git@${CKANEXT_DCAT_VERSION}#egg=ckanext-dcat # ckanext-security ###################################################### -ARG CKANEXT_SECURITY_VERSION="80dc1d6" +ARG CKANEXT_SECURITY_VERSION="upgrade-ckan-2.11" ENV CKANEXT_SECURITY_VERSION=${CKANEXT_SECURITY_VERSION} ENV CKANEXT_SECURITY_GITHUB_URL="https://github.com/MarijaKnezevic/ckanext-security" @@ -338,13 +338,13 @@ RUN set -ex && \ ckan config-tool "${CKAN_INI}" "ckanext.security.login_max_count = 3" && \ ckan config-tool "${CKAN_INI}" "ckanext.security.brute_force_key = user_name" && \ ckan config-tool "${CKAN_INI}" "ckanext.security.disable_password_reset_override = true" && \ - ckan config-tool "${CKAN_INI}" "ckanext.security.enable_totp = false" && \ + ckan config-tool "${CKAN_INI}" "ckanext.security.enable_totp = true" && \ ckan config-tool "${CKAN_INI}" "ckanext.dcat.enable_content_negotiation = True" && \ # ckan config-tool "${CKAN_INI}" "ckan.harvest.log_scope = 0" && \ # ckan config-tool "${CKAN_INI}" "ckan.harvest.log_level = debug" && \ # ckan config-tool "${CKAN_INI}" "ckan.harvest.log_timeframe = 10" && \ ckan config-tool "${CKAN_INI}" "PERMANENT_SESSION_LIFETIME = 600" - + # Remove wheels RUN set -ex && \ rm -rf ${APP_DIR}/ext_wheels From 96d3c583d39d0838a8b5043767a6e3532a876968 Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Wed, 29 Jan 2025 12:57:05 +0100 Subject: [PATCH 21/95] Move 'security' before 'theme_sddi' in CKAN_PLUGINS --- sddi-base/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index 2cf9cfde..bf8ab549 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -310,10 +310,10 @@ ENV CKAN__PLUGINS "envvars image_view text_view webpage_view datastore \ spatial_metadata spatial_query \ datesearch \ scheme_sddi \ + security \ theme_sddi \ scheming_datasets \ geo_view geojson_view wmts_view shp_view \ - security \ heroslideradmin \ # dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface \ dcat dcat_json_interface \ From 2d07deb14290d043b67ac6b6f07a901a03e96d4a Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Wed, 29 Jan 2025 15:36:20 +0100 Subject: [PATCH 22/95] Move security plugin after activity --- sddi-base/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index bf8ab549..85f8e50c 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -304,13 +304,13 @@ RUN set -ex && \ ENV CKAN__PLUGINS "envvars image_view text_view webpage_view datastore \ activity \ + security \ # harvest ckan_harvester \ hierarchy_display hierarchy_form \ relation \ spatial_metadata spatial_query \ datesearch \ scheme_sddi \ - security \ theme_sddi \ scheming_datasets \ geo_view geojson_view wmts_view shp_view \ From 2023c3598bac5ece769d103b54cbfc98e54229f0 Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Thu, 30 Jan 2025 10:25:04 +0100 Subject: [PATCH 23/95] Update theme extension to main version --- sddi-base/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index 85f8e50c..9ffb90d0 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -116,7 +116,7 @@ RUN set -ex && \ # Trigger sddi build # ckanext-theme-sddi ############################################################# -ARG CKANEXT_THEME_SDDI_VERSION="0.0.2" +ARG CKANEXT_THEME_SDDI_VERSION="main" ENV CKANEXT_THEME_SDDI_VERSION=${CKANEXT_THEME_SDDI_VERSION} ENV CKANEXT_THEME_SDDI_GITHUB_URL="https://github.com/MarijaKnezevic/ckanext-theme-sddi" From 94da720da1afc2b23c15e76afdd69e02d36b199e Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Thu, 30 Jan 2025 12:20:09 +0100 Subject: [PATCH 24/95] Remove comment for build trigger --- sddi-base/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index 9ffb90d0..3ef24825 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -114,7 +114,6 @@ RUN set -ex && \ pip wheel --wheel-dir=/wheels \ git+${CKANEXT_GEOVIEW_GITHUB_URL}.git@${CKANEXT_GEOVIEW_VERSION}#egg=ckanext-geoview -# Trigger sddi build # ckanext-theme-sddi ############################################################# ARG CKANEXT_THEME_SDDI_VERSION="main" ENV CKANEXT_THEME_SDDI_VERSION=${CKANEXT_THEME_SDDI_VERSION} From d8197ddbc9bf8ef735d93c6a6af26360774058fe Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Fri, 31 Jan 2025 09:52:41 +0100 Subject: [PATCH 25/95] Add sddi build trigger --- sddi-base/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index 3ef24825..9ffb90d0 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -114,6 +114,7 @@ RUN set -ex && \ pip wheel --wheel-dir=/wheels \ git+${CKANEXT_GEOVIEW_GITHUB_URL}.git@${CKANEXT_GEOVIEW_VERSION}#egg=ckanext-geoview +# Trigger sddi build # ckanext-theme-sddi ############################################################# ARG CKANEXT_THEME_SDDI_VERSION="main" ENV CKANEXT_THEME_SDDI_VERSION=${CKANEXT_THEME_SDDI_VERSION} From 8d9e1eb210b155cba273d1602160e4eae276078d Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Tue, 4 Feb 2025 13:52:06 +0100 Subject: [PATCH 26/95] Upgrade and versions --- sddi-base/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index 9ffb90d0..311f61a3 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -116,7 +116,7 @@ RUN set -ex && \ # Trigger sddi build # ckanext-theme-sddi ############################################################# -ARG CKANEXT_THEME_SDDI_VERSION="main" +ARG CKANEXT_THEME_SDDI_VERSION="0.0.3" ENV CKANEXT_THEME_SDDI_VERSION=${CKANEXT_THEME_SDDI_VERSION} ENV CKANEXT_THEME_SDDI_GITHUB_URL="https://github.com/MarijaKnezevic/ckanext-theme-sddi" @@ -152,7 +152,7 @@ RUN set -ex && \ git+${CKANEXT_DCAT_GITHUB_URL}.git@${CKANEXT_DCAT_VERSION}#egg=ckanext-dcat # ckanext-security ###################################################### -ARG CKANEXT_SECURITY_VERSION="upgrade-ckan-2.11" +ARG CKANEXT_SECURITY_VERSION="afc39c2" ENV CKANEXT_SECURITY_VERSION=${CKANEXT_SECURITY_VERSION} ENV CKANEXT_SECURITY_GITHUB_URL="https://github.com/MarijaKnezevic/ckanext-security" From 27e660c04bd9eaacc3d51fa556579321cb017e6e Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Tue, 4 Feb 2025 13:57:41 +0100 Subject: [PATCH 27/95] Upgrade ckanext-theme-sddi and ckanext-security versions --- sddi-base/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index 311f61a3..e91ea5f5 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -114,7 +114,6 @@ RUN set -ex && \ pip wheel --wheel-dir=/wheels \ git+${CKANEXT_GEOVIEW_GITHUB_URL}.git@${CKANEXT_GEOVIEW_VERSION}#egg=ckanext-geoview -# Trigger sddi build # ckanext-theme-sddi ############################################################# ARG CKANEXT_THEME_SDDI_VERSION="0.0.3" ENV CKANEXT_THEME_SDDI_VERSION=${CKANEXT_THEME_SDDI_VERSION} From 6e6e6a28cf22137ecbfeb7c9f281719d5101c3a5 Mon Sep 17 00:00:00 2001 From: Marija <93824048+MarijaKnezevic@users.noreply.github.com> Date: Tue, 4 Feb 2025 16:43:50 +0100 Subject: [PATCH 28/95] Update README.md and version pinning --- README.md | 48 +++++++++++++++++------------------------------- 1 file changed, 17 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 32c2a878..9273b518 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,6 @@ See [packages](https://github.com/orgs/tum-gis/packages?repo_name=ckan-docker) f - [:inbox\_tray: Image flavor overview](#inbox_tray-image-flavor-overview) - [`sddi-base`](#sddi-base) - [`sddi`](#sddi) - - [`sddi-social`](#sddi-social) - [:1234: Image versioning](#1234-image-versioning) - [Development image versions](#development-image-versions) - [CKAN and CKAN extension versions](#ckan-and-ckan-extension-versions) @@ -71,7 +70,6 @@ exists in this repository, where the image can be pulled. ```bash docker pull ghcr.io/tum-gis/ckan-sddi-base docker pull ghcr.io/tum-gis/ckan-sddi -docker pull ghcr.io/tum-gis/ckan-sddi-social ``` @@ -95,15 +93,6 @@ This is the image most people will usually want. ghcr.io/tum-gis/ckan-sddi ``` -### `sddi-social` - -`sddi` + optional CKAN extension for social media features, that may require staff -for moderation of social media content. - -```text -ghcr.io/tum-gis/ckan-sddi-social -``` - ## :1234: Image versioning The images in this repo are versioned and tagged according to the @@ -115,7 +104,6 @@ All available tags are listed in the packages of each image: - [`sddi-base`](https://github.com/tum-gis/ckan-docker/pkgs/container/ckan-sddi-base) - [`sddi`](https://github.com/tum-gis/ckan-docker/pkgs/container/ckan-sddi) -- [`sddi-social`](https://github.com/tum-gis/ckan-docker/pkgs/container/ckan-sddi-social) ### Development image versions @@ -162,8 +150,8 @@ This registry will be cleared periodically. ### CKAN and CKAN extension versions -CKAN version: `2.9.9` -CKAN base image: `ghcr.io/keitaroinc/ckan:2.9.9-focal` +CKAN version: `2.11.1` +CKAN base image: `ckan/ckan-base:2.11.1` The CKAN catalog platform uses several extensions to provide the functionality needed for the SDDI concept. The table below lists the included extensions with @@ -177,21 +165,20 @@ are alway pinned to a stable release number or commit hash. > **Note:** Version pinning is only applied for release versions. The `edge` > image may depend on upstream branches instead. -| Extension | Version | `sddi-base` | `sddi` | `sddi-social` | Description | -|---|---|:---:|:---:|:---:|---| -| [`scheming`](https://github.com/MarijaKnezevic/ckanext-scheming) | `f98daec` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | Configure and share CKAN dataset metadata forms. | -| [`hierarchy`](https://github.com/ckan/ckanext-hierarchy) | `v1.2.0` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | Allows to organize organizations and groups in a hierarchy tree (nested groups/orgs). | -| [`grouphierarchysddi`](https://github.com/tum-gis/ckanext-grouphierarchy-sddi) | `1.1.4` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | Extends `hierarchy` with pre-defined groups and topics of the SDDI concept. | -| [`relation`](https://github.com/tum-gis/ckanext-relation-sddi) | `1.0.3` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | Enables to create and visualize different types of relations (*realated_to*, *depends_on*, *part_of*) between catalog entries. | -| [`spatial`](https://github.com/MarijaKnezevic/ckanext-spatial) | `c2118b9` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | Provides the ability to search for datasets according to a given spatial extent. | -| [`datesearch`](https://github.com/MarijaKnezevic/ckanext-datesearch) | `1.0.2` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | Provides the ability to search for datasets according to a given time frame. The search includes all datasets, in which the time of validity overlaps in at least one second with the search time frame. | -| [`repeating`](https://github.com/MarijaKnezevic/ckanext-repeating) | `1.0.0` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | This extension provides a way to store repeating fields in CKAN datasets, resources, organizations and groups. | -| [`composite`](https://github.com/EnviDat/ckanext-composite) | `1e6d7bb` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | The extension allows to store structured dataset metadata, single or multiple fields. Only one level of subfields is possible. The subfields can be basic text, date type or dropboxes. | -| [`restricted`](https://github.com/MarijaKnezevic/ckanext-restricted) | `1.0.0` | | :heavy_check_mark: | :heavy_check_mark: | CKAN extension to restrict the accessibility to the resources of a dataset. This way the package metadata is accesible but not the data itself (resource). The resource access restriction level can be individualy defined for every package. | -| [`dcat`](https://github.com/ckan/ckanext-dcat) | `v1.4.0` | | :heavy_check_mark: | :heavy_check_mark: | Allow CKAN to expose and consume metadata from other catalogs using RDF documents serialized using DCAT. | -| [`geoview`](https://github.com/ckan/ckanext-geoview) | `v0.0.20` | | :heavy_check_mark: | :heavy_check_mark: | This extension contains view plugins to display geospatial files and services in CKAN. | -| [`disqus`](https://github.com/ckan/ckanext-disqus) | | | | :heavy_check_mark: | The Disqus extension allows site visitors to comment on individual packages using an AJAX-based commenting system. The downsides of this plugin are that comments are not stored locally and user information is not shared between CKAN and the commenting system. | -| [`password_policy`](https://github.com/keitaroinc/ckanext-password-policy) | `5618dc9`|:heavy_check_mark: |:heavy_check_mark:| :heavy_check_mark: | CKAN extension that adds password policy for all the users. | +| Extension | Version | `sddi-base` |`sddi` | Description | +|---|---|:---:|:---:|:---| +| [`ckanext-hierarchy`](https://github.com/ckan/ckanext-hierarchy ) | `abb4e2d` | :heavy_check_mark: | :heavy_check_mark: | Allows to organize organizations and groups in a hierarchy tree (nested groups/orgs). | +| [`ckanext-scheming` ](https://github.com/ckan/ckanext-scheming ) | `27035f4` |:heavy_check_mark: | :heavy_check_mark: | Configure and share CKAN dataset metadata forms. | +| [`ckanext-geoview` ](https://github.com/ckan/ckanext-geoview) | `v0.2.2` |:heavy_check_mark: |:heavy_check_mark: | Configure and share CKAN dataset metadata forms. | +| [`ckanext-clamav` ](https://github.com/mutantsan/ckanext-clamav) | `a1d23ac` |:heavy_check_mark: | :heavy_check_mark: |CKAN extension that integrates ClamAV antivirus scanning to ensure the security of uploaded files by automatically checking them for malware.| +| [`ckanext-dcat` ](https://github.com/ckan/ckanext-dcat ) | `v1.5.1` |:heavy_check_mark: | :heavy_check_mark: |Allow CKAN to expose and consume metadata from other catalogs using RDF documents serialized using DCAT.| +| [`ckanext-relation-sddi`](https://github.com/tum-gis/ckanext-relation-sddi ) | `1.1.0` | | :heavy_check_mark: | Enables to create and visualize different types of relations (*realated_to*, *depends_on*, *part_of*) between catalog entries. | +| [`ckanext-datesearch`](https://github.com/MarijaKnezevic/ckanext-datesearch) | `1.1.0`|| :heavy_check_mark: | Provides the ability to search for datasets according to a given time frame. The search includes all datasets, in which the time of validity overlaps in at least one second with the search time frame. | +| [`ckanext-spatial`](https://github.com/ckan/ckanext-spatial) | `v2.2.0` | |:heavy_check_mark: | Enables geospatial capabilities to CKAN instance. | +| [`ckanext-scheme-sddi`](https://github.com/MarijaKnezevic/ckanext-scheme-sddi) | `0.0.1` || :heavy_check_mark: | This plugin is extending CKAN schema definition, validation, and custom field support accordingly to SDDI needs. | +| [`ckanext-theme-sddi`](https://github.com/MarijaKnezevic/ckanext-theme-sddi) | `0.0.3` | |:heavy_check_mark: | This plugin is customizing the look of SDDI CKAN instance with theme management capabilities for improved branding and user needs.| +| [`ckanext-security` ](https://github.com/MarijaKnezevic/ckanext-security) | `afc39c2` || :heavy_check_mark: | CKAN extension that enhances data access control. In the SDDI context, context is used to define the maximum number of failed logon attempts and to automatically log off after a period of inactivity.| +| [`ckanext-heroslideradmin` ](https://github.com/dathere/ckanext-heroslideradmin) | `4b60e00` | |:heavy_check_mark: | CKAN extension that enables the management of a hero slider on your CKAN site, allowing for dynamic display of featured content and improved visual engagement.| ## :rocket: Usage @@ -324,8 +311,7 @@ to the SDDI concepts, tools, documentations, education, and funding: [eit Climate-KIC](https://www.climate-kic.org/) (SDDI research project) for funding the work on SDDI concepts and implementation. -- [Tome Petrovski](https://github.com/TomeCirun) :raised_hands: for professional support - with CKAN and CKAN extension development. +- [Tome Petrovski](https://github.com/TomeCirun), [Konstantin Sivakov](https://github.com/tino097), [Ilche Bedelovski](https://github.com/ilchebedelovski) and [Aleksandra Lazoroska](https://github.com/aleksandralazoroska):raised_hands: for professional support with CKAN and CKAN extension development. - [KEITARO](https://www.keitaro.com/) for their [CKAN Docker images](https://github.com/keitaroinc/docker-ckan) and [CKAN Helm chart](https://github.com/keitaroinc/ckan-helm) that inspired this work. From 3d7ce53b79777abb4568ca7ae709fcc7d5cf3c8e Mon Sep 17 00:00:00 2001 From: Marija <93824048+MarijaKnezevic@users.noreply.github.com> Date: Tue, 4 Feb 2025 16:44:20 +0100 Subject: [PATCH 29/95] Update CHANGELOG.md --- CHANGELOG.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4622ddcf..9373fd72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). For releases `< 1.0.0` minor version steps may indicate breaking changes too. +## [3.0.0] - 2025-02-05 + +### Added +- `ckanext-envvars`, `ckanext-security`, `ckanext-scheme-sddi`, `ckanext-theme-sddi`, `ckanext-heroslideradmin`. Further details can be found in the changelog file for each plugin. + +### Changed +- Migration from CKAN version 2.9.9. to CKAN 2.11.1 + - A CKAN base `ckan/ckan-base:2.11.1` image is used as the build stage image +- Updating the following extensions: `ckanext-hierarchy`,`ckanext-relation`, `ckanext-scheming`, `ckanext datesearch`, `ckanext-spatial`, `ckanext-geoview`, `ckanext-clamav`, `ckanext-dcat`. Further details can be found in the changelog file for each plugin. +- `sddi-base` image is re-organized accordingly to [#65](https://github.com/tum-gis/ckan-docker/issues/65) + +### Removed +- `sddi-social` image accordingly to [#66](https://github.com/tum-gis/ckan-docker/issues/66) +- Some plugins are being dropped because they are either supported directly by CKAN or merged with other plugins: `ckanext-grouphierarchy-sddi` , `ckanext-composite`, `ckanext-repeating`, `ckanext-password-policy` + ## [2.1.2] - 2024-04-17 ### Added - Variable that defines after how many seconds of user inactivity the user is logged out `who.timeout = 1800` @@ -233,7 +248,8 @@ for production environments.** ### Known issues -[Unreleased]: https://github.com/tum-gis/ckan-docker/compare/2.1.2...HEAD +[Unreleased]: https://github.com/tum-gis/ckan-docker/compare/3.0.0...HEAD +[3.0.0]: https://github.com/tum-gis/ckan-docker/compare/2.1.2...3.0.0 [2.1.2]: https://github.com/tum-gis/ckan-docker/compare/2.1.1...2.1.2 [2.1.1]: https://github.com/tum-gis/ckan-docker/compare/2.1.0...2.1.1 [2.1.0]: https://github.com/tum-gis/ckan-docker/compare/2.0.1...2.1.0 From c227be098524ec45e7f6d117f7e3d578150306b2 Mon Sep 17 00:00:00 2001 From: Marija <93824048+MarijaKnezevic@users.noreply.github.com> Date: Tue, 4 Feb 2025 16:45:14 +0100 Subject: [PATCH 30/95] Delete sddi-social directory --- sddi-social/.dockerignore | 2 -- sddi-social/Dockerfile | 50 ------------------------------------ sddi-social/Dockerfile.debug | 19 -------------- 3 files changed, 71 deletions(-) delete mode 100644 sddi-social/.dockerignore delete mode 100644 sddi-social/Dockerfile delete mode 100644 sddi-social/Dockerfile.debug diff --git a/sddi-social/.dockerignore b/sddi-social/.dockerignore deleted file mode 100644 index 70bbfa55..00000000 --- a/sddi-social/.dockerignore +++ /dev/null @@ -1,2 +0,0 @@ -# Ignore local helper scripts -/*.sh diff --git a/sddi-social/Dockerfile b/sddi-social/Dockerfile deleted file mode 100644 index aabb249f..00000000 --- a/sddi-social/Dockerfile +++ /dev/null @@ -1,50 +0,0 @@ -# ############################################################################# -# # Build stage -# ############################################################################# -ARG BASEIMAGE_REPOSITORY=ghcr.io/tum-gis/ckan-sddi -ARG BASEIMAGE_VERSION=latest -ARG CKAN_VERSION_BUILD_STAGE=2.9.9-dev - -FROM ckan/ckan-base:${CKAN_VERSION_BUILD_STAGE} as extbuild - -USER root - -# ckanext-disqus ############################################################## -ARG CKANEXT_DISQUS_VERSION="d3fcdb7" -ENV CKANEXT_DISQUS_VERSION=${CKANEXT_DISQUS_VERSION} -ENV CKANEXT_DISQUS_GITHUB_URL="https://github.com/ckan/ckanext-disqus" - -RUN set -ex && \ - mkdir -p /wheels && \ - pip wheel --wheel-dir=/wheels \ - git+${CKANEXT_DISQUS_GITHUB_URL}.git@${CKANEXT_DISQUS_VERSION}#egg=disqus - -# ############################################################################### -# # Runtime stage -# ############################################################################### -FROM ${BASEIMAGE_REPOSITORY}:${BASEIMAGE_VERSION} as runtime - -USER root - -ENV CKAN__PLUGINS "image_view text_view recline_view webpage_view datastore datapusher \ - hierarchy_display hierarchy_form display_group relation \ - spatial_metadata spatial_query datesearch repeating composite scheming_datasets \ - password_policy resource_proxy geo_view geojson_view wmts_view shp_view \ - dcat dcat_json_interface structured_data \ - restricted clamav \ - disqus \ - envvars" - -# Copy python wheels from build stage -COPY --from=extbuild /wheels ${APP_DIR}/ext_wheels - -# ckanext-dcat ################################################################ -RUN set -ex && \ - pip install --no-index --find-links=${APP_DIR}/ext_wheels disqus - -RUN set -ex && \ - ckan config-tool "${CKAN_INI}" "ckan.plugins = ${CKAN__PLUGINS}" && \ - # Remove wheels - rm -rf ${APP_DIR}/ext_wheels - -USER ckan diff --git a/sddi-social/Dockerfile.debug b/sddi-social/Dockerfile.debug deleted file mode 100644 index 935e7164..00000000 --- a/sddi-social/Dockerfile.debug +++ /dev/null @@ -1,19 +0,0 @@ -ARG BASEIMAGE_REPOSITORY=ghcr.io/tum-gis/ckan-sddi-social -ARG BASEIMAGE_VERSION=edge - -FROM ${BASEIMAGE_REPOSITORY}:${BASEIMAGE_VERSION} - -ARG CKAN_VERSION=2.9.9 -ENV CKAN_VERSION=${CKAN_VERSION} - -USER root - -ADD https://raw.githubusercontent.com/ckan/ckan/ckan-${CKAN_VERSION}/dev-requirements.txt /dev-requirements.txt -RUN set -ex && \ - pip install -r /dev-requirements.txt && \ - rm /dev-requirements.txt - -RUN set -ex && \ - ckan config-tool "${CKAN_INI}" "debug = True" - -USER ckan From f5026933502b64550f13863f70cf04da5b44fad4 Mon Sep 17 00:00:00 2001 From: Marija <93824048+MarijaKnezevic@users.noreply.github.com> Date: Tue, 4 Feb 2025 16:48:21 +0100 Subject: [PATCH 31/95] Update Dockerfile - Migration of functions from SDDI-Base to SDDI --- sddi/Dockerfile | 389 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 321 insertions(+), 68 deletions(-) diff --git a/sddi/Dockerfile b/sddi/Dockerfile index b3d59a90..94dc8404 100644 --- a/sddi/Dockerfile +++ b/sddi/Dockerfile @@ -1,107 +1,360 @@ -# ############################################################################# -# # Build stage -# ############################################################################# -ARG BASEIMAGE_REPOSITORY=ghcr.io/tum-gis/ckan-sddi-base -ARG BASEIMAGE_VERSION=latest -ARG CKAN_VERSION_BUILD_STAGE=2.9.9-dev - -FROM ckan/ckan-base:${CKAN_VERSION_BUILD_STAGE} as extbuild +############################################################################### +# Extbuild stage +############################################################################### +FROM ckan/ckan-base:2.11.1 as extbuild USER root -# ckanext-geoview ############################################################# -ARG CKANEXT_GEOVIEW_VERSION="v0.0.20" -ENV CKANEXT_GEOVIEW_VERSION=${CKANEXT_GEOVIEW_VERSION} -ENV CKANEXT_GEOVIEW_GITHUB_URL="https://github.com/ckan/ckanext-geoview" +RUN apt-get update && apt-get install -y \ + git \ + curl \ + libpq-dev \ + gcc \ + make \ + g++ \ + autoconf \ + automake \ + libtool \ + patch \ + musl-dev \ + libpcre3-dev \ + libpcre3 \ + libffi-dev \ + libxml2-dev \ + libxslt-dev + +RUN pip install -U markupsafe==2.0.1 sqlalchemy==1.4.41 + +# ckanext-hierarchy ########################################################### +ARG CKANEXT_HIERARCHY_VERSION="abb4e2d" +ENV CKANEXT_HIERARCHY_VERSION=${CKANEXT_HIERARCHY_VERSION} + +RUN set -ex && \ + mkdir -p /wheels && \ + pip install -r https://raw.githubusercontent.com/ckan/ckanext-hierarchy/${CKANEXT_HIERARCHY_VERSION}/dev-requirements.txt + +RUN set -ex && \ + pip wheel --wheel-dir=/wheels -r https://raw.githubusercontent.com/ckan/ckanext-hierarchy/${CKANEXT_HIERARCHY_VERSION}/requirements.txt && \ + pip wheel --wheel-dir=/wheels git+https://github.com/ckan/ckanext-hierarchy.git@${CKANEXT_HIERARCHY_VERSION}#egg=ckanext-hierarchy && \ + curl -o /wheels/ckanext-hierarchy.txt https://raw.githubusercontent.com/ckan/ckanext-hierarchy/${CKANEXT_HIERARCHY_VERSION}/requirements.txt && \ + ls -lah /wheels + +# ckanext-envvars +ENV ENVVARS_GIT_URL=https://github.com/ckan/ckanext-envvars/ +ENV ENVVARS_GIT_BRANCH=v0.0.6 + +RUN set -ex && \ + pip3 wheel --wheel-dir=/wheels git+${ENVVARS_GIT_URL}@${ENVVARS_GIT_BRANCH}#egg=ckanext-envvars + +# ckanext-relation ############################################################ +ARG CKANEXT_RELATION_VERSION="1.1.0" +ENV CKANEXT_RELATION_VERSION=${CKANEXT_RELATION_VERSION} RUN set -ex && \ - mkdir -p /wheels && \ - pip install -r \ - https://raw.githubusercontent.com/ckan/ckanext-geoview/${CKANEXT_GEOVIEW_VERSION}/dev-requirements.txt && \ pip wheel --wheel-dir=/wheels \ - git+${CKANEXT_GEOVIEW_GITHUB_URL}.git@${CKANEXT_GEOVIEW_VERSION}#egg=ckanext-geoview + git+https://github.com/tum-gis/ckanext-relation-sddi.git@${CKANEXT_RELATION_VERSION}#egg=ckanext-relation && \ + pip wheel --wheel-dir=/wheels -r \ + https://raw.githubusercontent.com/tum-gis/ckanext-relation-sddi/${CKANEXT_RELATION_VERSION}/requirements.txt && \ + curl -o /wheels/ckanext-relation.txt \ + https://raw.githubusercontent.com/tum-gis/ckanext-relation-sddi/${CKANEXT_RELATION_VERSION}/requirements.txt && \ + ls -lah /wheels -# ckanext-dcat ################################################################ -ARG CKANEXT_DCAT_VERSION="v1.4.0" -ENV CKANEXT_DCAT_VERSION=${CKANEXT_DCAT_VERSION} -ENV CKANEXT_DCAT_GITHUB_URL="https://github.com/ckan/ckanext-dcat" +# ckanext-scheming ############################################################ +ARG CKANEXT_SCHEMING_VERSION="27035f4" +ENV CKANEXT_SCHEMING_VERSION=${CKANEXT_SCHEMING_VERSION} +ENV CKANEXT_SCHEMING_GITHUB_URL="https://github.com//ckan/ckanext-scheming" RUN set -ex && \ - pip install -r \ - https://raw.githubusercontent.com/ckan/ckanext-dcat/${CKANEXT_DCAT_VERSION}/dev-requirements.txt && \ - curl -o /wheels/ckanext-dcat.txt \ - https://raw.githubusercontent.com/ckan/ckanext-dcat/${CKANEXT_DCAT_VERSION}/requirements.txt && \ pip wheel --wheel-dir=/wheels \ - git+${CKANEXT_DCAT_GITHUB_URL}.git@${CKANEXT_DCAT_VERSION}#egg=ckanext-dcat + git+${CKANEXT_SCHEMING_GITHUB_URL}.git@${CKANEXT_SCHEMING_VERSION}#egg=ckanext-scheming -# ckanext-restricted ########################################################## -ARG CKANEXT_RESTRICTED_VERSION="1.0.0" -ENV CKANEXT_RESTRICTED_VERSION=${CKANEXT_RESTRICTED_VERSION} -ENV CKANEXT_RESTRICTED_GITHUB_URL="https://github.com/MarijaKnezevic/ckanext-restricted" +# ckanext datesearch ########################################################## +ARG CKANEXT_DATESEARCH_VERSION="1.1.1" +ENV CKANEXT_DATESEARCH_VERSION=${CKANEXT_DATESEARCH_VERSION} +ENV CKANEXT_DATESEARCH_VERSION_GITHUB_URL="https://github.com/MarijaKnezevic/ckanext-datesearch" RUN set -ex && \ - pip install -r \ - https://raw.githubusercontent.com/MarijaKnezevic/ckanext-restricted/${CKANEXT_RESTRICTED_VERSION}/dev-requirements.txt && \ pip wheel --wheel-dir=/wheels \ - git+${CKANEXT_RESTRICTED_GITHUB_URL}.git@${CKANEXT_RESTRICTED_VERSION}#egg=ckanext-restricted + git+${CKANEXT_DATESEARCH_VERSION_GITHUB_URL}.git@${CKANEXT_DATESEARCH_VERSION}#egg=ckanext-datesearch + +# ckanext-harvest ########################################################### +# ARG CKANEXT_HARVEST_VERSION="v1.6.1" +# ENV CKANEXT_HARVEST_VERSION=${CKANEXT_HARVEST_VERSION} +# ENV CKANEXT_HARVEST_GITHUB_URL="https://github.com/ckan/ckanext-harvest.git" + +# RUN set -ex && \ +# mkdir -p /wheels && \ +# pip install -r https://raw.githubusercontent.com/ckan/ckanext-harvest/${CKANEXT_HARVEST_VERSION}/requirements.txt -# ckanext-clamav ############################################################## -ARG CKANEXT_CALMAV_VERSION="master" -ENV CKANEXT_CALMAV_VERSION=${CKANEXT_CALMAV_VERSION} -ENV CKANEXT_CALMAV_GITHUB_URL="https://github.com/mutantsan/ckanext-clamav" +# RUN set -ex && \ +# pip wheel --wheel-dir=/wheels -r https://raw.githubusercontent.com/ckan/ckanext-harvest/${CKANEXT_HARVEST_VERSION}/requirements.txt && \ +# pip wheel --wheel-dir=/wheels git+https://github.com/ckan/ckanext-harvest.git@${CKANEXT_HARVEST_VERSION}#egg=ckanext-harvest && \ +# curl -o /wheels/ckanext-harvest.txt https://raw.githubusercontent.com/ckan/ckanext-harvest/${CKANEXT_HARVEST_VERSION}/requirements.txt && \ +# ls -lah /wheels + +# ckanext-spatial ############################################################# +ENV CKANEXT_SPATIAL_GITHUB_URL="https://github.com/ckan/ckanext-spatial" +ENV CKANEXT_SPATIAL_VERSION="v2.2.0" RUN set -ex && \ - pip wheel --wheel-dir=/wheels -r \ - https://raw.githubusercontent.com/mutantsan/ckanext-clamav/${CKANEXT_CALMAV_VERSION}/requirements.txt && \ - curl -o /wheels/ckanext-clamav.txt \ - https://raw.githubusercontent.com/mutantsan/ckanext-clamav/${CKANEXT_CALMAV_VERSION}/requirements.txt && \ + curl -o /wheels/ckanext-spatial-requirements.txt \ + https://raw.githubusercontent.com/ckan/ckanext-spatial/${CKANEXT_SPATIAL_VERSION}/requirements-py2.txt && \ pip wheel --wheel-dir=/wheels \ - git+${CKANEXT_CALMAV_GITHUB_URL}.git@${CKANEXT_CALMAV_VERSION}#egg=ckanext-clamav + git+${CKANEXT_SPATIAL_GITHUB_URL}.git@${CKANEXT_SPATIAL_VERSION}#egg=ckanext-spatial + +# ckanext-geoview ############################################################# +ARG CKANEXT_GEOVIEW_VERSION="v0.2.2" +ENV CKANEXT_GEOVIEW_VERSION=${CKANEXT_GEOVIEW_VERSION} +ENV CKANEXT_GEOVIEW_GITHUB_URL="https://github.com/ckan/ckanext-geoview" + +RUN set -ex && \ + curl -o /wheels/ckanext-geoview-dev-requirements.txt \ + ${CKANEXT_GEOVIEW_GITHUB_URL}/raw/${CKANEXT_GEOVIEW_VERSION}/dev-requirements.txt && \ + pip install -r /wheels/ckanext-geoview-dev-requirements.txt && \ + pip wheel --wheel-dir=/wheels \ + git+${CKANEXT_GEOVIEW_GITHUB_URL}.git@${CKANEXT_GEOVIEW_VERSION}#egg=ckanext-geoview + +# ckanext-theme-sddi ############################################################# +ARG CKANEXT_THEME_SDDI_VERSION="0.0.3" +ENV CKANEXT_THEME_SDDI_VERSION=${CKANEXT_THEME_SDDI_VERSION} +ENV CKANEXT_THEME_SDDI_GITHUB_URL="https://github.com/MarijaKnezevic/ckanext-theme-sddi" + +RUN set -ex && \ + curl -o /wheels/ckanext-theme-sddi-dev-requirements.txt \ + ${CKANEXT_THEME_SDDI_GITHUB_URL}/raw/${CKANEXT_THEME_SDDI_VERSION}/requirements.txt && \ + pip install -r /wheels/ckanext-theme-sddi-dev-requirements.txt && \ + pip wheel --wheel-dir=/wheels \ + git+${CKANEXT_THEME_SDDI_GITHUB_URL}.git@${CKANEXT_THEME_SDDI_VERSION}#egg=ckanext-theme-sddi + +# ckanext-clamav ############################################################# +ARG CKANEXT_CLAMAV_VERSION="a1d23ac" +ENV CKANEXT_CLAMAV_VERSION=${CKANEXT_CLAMAV_VERSION} +ENV CKANEXT_CLAMAV_GITHUB_URL="https://github.com/DataShades/ckanext-clamav" + +RUN set -ex && \ + curl -o /wheels/ckanext-clamav-requirements.txt \ + ${CKANEXT_CLAMAV_GITHUB_URL}/raw/${CKANEXT_CLAMAV_VERSION}/requirements.txt && \ + pip install -r /wheels/ckanext-clamav-requirements.txt && \ + pip wheel --wheel-dir=/wheels \ + git+${CKANEXT_CLAMAV_GITHUB_URL}.git@${CKANEXT_CLAMAV_VERSION}#egg=ckanext-clamav + +# ckanext-dcat ########################################################## +ARG CKANEXT_DCAT_VERSION="v1.5.1" +ENV CKANEXT_DCAT_VERSION=${CKANEXT_DCAT_VERSION} +ENV CKANEXT_DCAT_GITHUB_URL="https://github.com/ckan/ckanext-dcat" + +RUN set -ex && \ + curl -o /wheels/ckanext-dcat-requirements.txt \ + https://raw.githubusercontent.com/ckan/ckanext-dcat/${CKANEXT_DCAT_VERSION}/requirements.txt && \ + pip install -r /wheels/ckanext-dcat-requirements.txt && \ + pip wheel --wheel-dir=/wheels \ + git+${CKANEXT_DCAT_GITHUB_URL}.git@${CKANEXT_DCAT_VERSION}#egg=ckanext-dcat + +# ckanext-security ###################################################### +ARG CKANEXT_SECURITY_VERSION="afc39c2" +ENV CKANEXT_SECURITY_VERSION=${CKANEXT_SECURITY_VERSION} +ENV CKANEXT_SECURITY_GITHUB_URL="https://github.com/MarijaKnezevic/ckanext-security" -# ############################################################################# -# # Runtime stage -# ############################################################################# -FROM ${BASEIMAGE_REPOSITORY}:${BASEIMAGE_VERSION} as runtime +RUN set -ex && \ + curl -o /wheels/ckanext-security-requirements.txt \ + https://raw.githubusercontent.com/MarijaKnezevic/ckanext-security/${CKANEXT_SECURITY_VERSION}/requirements.txt && \ + pip install -r /wheels/ckanext-security-requirements.txt && \ + pip wheel --wheel-dir=/wheels \ + git+${CKANEXT_SECURITY_GITHUB_URL}.git@${CKANEXT_SECURITY_VERSION}#egg=ckanext-security + +############################################################################### +# Runtime stage +############################################################################### +FROM ckan/ckan-base:2.11.1 + +ENV APP_DIR=/srv/app +ENV SRC_DIR=/srv/app/src +ENV CKAN_DIR=${SRC_DIR}/ckan +ENV DATA_DIR=/srv/app/data +ENV PIP_SRC=${SRC_DIR} +ENV CKAN_INI=${APP_DIR}/production.ini +ENV CKAN_STORAGE_PATH=/var/lib/ckan +ENV UWSGI_HARAKIRI=50 USER root -ENV CKAN__PLUGINS "image_view text_view recline_view webpage_view datastore datapusher \ - hierarchy_display hierarchy_form display_group relation \ - spatial_metadata spatial_query datesearch repeating composite scheming_datasets \ - password_policy resource_proxy geo_view geojson_view wmts_view shp_view \ - dcat dcat_json_interface structured_data \ - restricted clamav \ - envvars" +# Setting the locale +ENV LC_ALL="en_US.UTF-8" +RUN apt-get update && apt-get install --no-install-recommends -y locales +RUN sed -i "/$LC_ALL/s/^# //g" /etc/locale.gen +RUN dpkg-reconfigure --frontend=noninteractive locales +RUN update-locale LANG=${LC_ALL} -# Copy python wheels from build stage +# Set timezone +RUN echo "UTC" > /etc/timezone + +# Update the package lists and install required packages +RUN apt-get update && apt-get install -y \ + bash \ + git \ + gettext \ + curl \ + wget \ + unzip \ + postgresql-client \ + libmagic1 \ + libpcre3 \ + libxslt1.1 \ + libxml2 \ + tzdata \ + apache2-utils \ + musl-dev \ + libssl-dev \ + proj-bin \ + libproj-dev \ + proj-data \ + python3-cffi \ + uwsgi-plugin-python3 \ + supervisor \ + sudo + +# Cleanup to reduce image size +RUN apt-get clean && rm -rf /var/lib/apt/lists/* + +# Create SRC_DIR +RUN mkdir -p ${SRC_DIR} && \ + # Link python to python3 + ln -s /usr/bin/python3 /usr/bin/python + +# Get artifacts from build stages COPY --from=extbuild /wheels ${APP_DIR}/ext_wheels +# Create local storage folder +RUN mkdir -p ${CKAN_STORAGE_PATH} && \ + chown -R ckan:ckan-sys ${CKAN_STORAGE_PATH} && \ + chown -R ckan:ckan-sys ${APP_DIR} + +USER ckan + +RUN set -ex pip install markupsafe==2.0.1 \ + setuptools \ + wheel \ + sqlalchemy==1.4.41 \ + gevent==22.10.2 \ + greenlet==2.0.1 + +WORKDIR ${CKAN_DIR} + +# ckanext-harvest ########################################################### +# RUN set -ex && \ +# pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-harvest && \ +# pip install --no-index --find-links=${APP_DIR}/ext_wheels -r ${APP_DIR}/ext_wheels/ckanext-harvest.txt + +# ckanext-hierarchy ########################################################### +RUN set -ex && \ + pip install --find-links=${APP_DIR}/ext_wheels -r ${APP_DIR}/ext_wheels/ckanext-hierarchy.txt && \ + pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-hierarchy + +# ckanext-envvars ############################################################ +RUN set -ex && \ + pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-envvars + +# ckanext-relation ############################################################ +RUN set -ex && \ + pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-relation + +# ckanext-scheming ############################################################ +RUN set -ex && \ + pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-scheming + +# ckanext-datesearch ########################################################## +RUN set -ex && \ + pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-datesearch + +# ckanext-spatial ############################################################# +RUN set -ex && \ + pip3 install -e 'git+https://github.com/ckan/ckanext-spatial.git#egg=ckanext-spatial' && \ + pip3 install -r 'https://raw.githubusercontent.com/ckan/ckanext-spatial/master/requirements.txt' + # ckanext-geoview ############################################################# RUN set -ex && \ pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-geoview -# ckanext-dcat ################################################################ +# ckanext-scheme-sddi ############################################################ RUN set -ex && \ - pip install -r ${APP_DIR}/ext_wheels/ckanext-dcat.txt && \ - pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-dcat + pip install -e "git+https://github.com/MarijaKnezevic/ckanext-scheme-sddi@0.0.1#egg=ckanext-scheme-sddi" -# ckanext-restricted ########################################################## +# ckanext-theme-sddi ############################################################# RUN set -ex && \ - pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-restricted + pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-theme-sddi -# ckanext-clamav ############################################################## +# ckanext-heroslideradmin ############################################################# +RUN set -ex && \ + pip install -e "git+https://github.com/dathere/ckanext-heroslideradmin.git@4b60e00#egg=ckanext-heroslideradmin" + +# ckanext-clamav ############################################################# RUN set -ex && \ - pip install -r ${APP_DIR}/ext_wheels/ckanext-clamav.txt && \ pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-clamav - + +# ckanext-dcat ########################################################## +RUN set -ex && \ + pip install --find-links=${APP_DIR}/ext_wheels -r ${APP_DIR}/ext_wheels/ckanext-dcat-requirements.txt && \ + pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-dcat + +# ckanext-security ###################################################### +RUN set -ex && \ + pip install --find-links=${APP_DIR}/ext_wheels -r ${APP_DIR}/ext_wheels/ckanext-security-requirements.txt && \ + pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-security + +ENV CKAN__PLUGINS "envvars image_view text_view webpage_view datastore \ + activity \ + security \ + # harvest ckan_harvester \ + hierarchy_display hierarchy_form \ + relation \ + spatial_metadata spatial_query \ + datesearch \ + scheme_sddi \ + theme_sddi \ + scheming_datasets \ + geo_view geojson_view wmts_view shp_view \ + heroslideradmin \ + # dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface \ + dcat dcat_json_interface \ + clamav" + +RUN set -ex && \ + ckan generate config ${APP_DIR}/production.ini + RUN set -ex && \ ckan config-tool "${CKAN_INI}" "ckan.plugins = ${CKAN__PLUGINS}" && \ - ckan config-tool "${CKAN_INI}" "ckanext.geoview.ol_viewer.formats = wms kml" && \ - ckan config-tool "${CKAN_INI}" "ckanext.geoview.shp_viewer.srid = 4326" && \ - ckan config-tool "${CKAN_INI}" "ckanext.geoview.shp_viewer.encoding = UTF-8" && \ - ckan config-tool "${CKAN_INI}" "who.timeout = 1800" && \ - ckan config-tool "${CKAN_INI}" "ckan.auth.public_user_details = False" && \ - # Remove wheels + ckan config-tool "${CKAN_INI}" "ckan.spatial.srid = 4326" && \ + ckan config-tool "${CKAN_INI}" "ckanext.spatial.search_backend = solr-bbox" && \ + ckan config-tool "${CKAN_INI}" "ckanext.spatial.use_postgis_sorting = true" && \ + ckan config-tool "${CKAN_INI}" "scheming.dataset_schemas = ckanext.scheme_sddi:sddi_dataset.yaml" && \ + ckan config-tool "${CKAN_INI}" "scheming.presets = ckanext.scheming:presets.json ckanext.scheme_sddi:sddi_presets.json" && \ + ckan config-tool "${CKAN_INI}" "scheming.dataset_fallback = false" && \ + ckan config-tool "${CKAN_INI}" "ckanext.dathere_theme.column_count = 4" && \ + ckan config-tool "${CKAN_INI}" "ckanext.spatial.common_map.type = custom" && \ + ckan config-tool "${CKAN_INI}" "ckanext.spatial.common_map.custom.url = https://tile.openstreetmap.de/{z}/{x}/{y}.png" && \ + ckan config-tool "${CKAN_INI}" "ckanext.spatial.common_map.attribution = OpenStreetMap contributors." && \ + ckan config-tool "${CKAN_INI}" "ckanext.security.lock_timeout = 900" && \ + ckan config-tool "${CKAN_INI}" "ckanext.security.login_max_count = 3" && \ + ckan config-tool "${CKAN_INI}" "ckanext.security.brute_force_key = user_name" && \ + ckan config-tool "${CKAN_INI}" "ckanext.security.disable_password_reset_override = true" && \ + ckan config-tool "${CKAN_INI}" "ckanext.security.enable_totp = true" && \ + ckan config-tool "${CKAN_INI}" "ckanext.dcat.enable_content_negotiation = True" && \ +# ckan config-tool "${CKAN_INI}" "ckan.harvest.log_scope = 0" && \ +# ckan config-tool "${CKAN_INI}" "ckan.harvest.log_level = debug" && \ +# ckan config-tool "${CKAN_INI}" "ckan.harvest.log_timeframe = 10" && \ + ckan config-tool "${CKAN_INI}" "PERMANENT_SESSION_LIFETIME = 600" + +# Remove wheels +RUN set -ex && \ rm -rf ${APP_DIR}/ext_wheels -USER ckan +WORKDIR ${APP_DIR} + +# Create entrypoint directory for children image scripts +ONBUILD RUN mkdir /docker-entrypoint.d + +EXPOSE 5000 + +HEALTHCHECK --interval=60s --timeout=5s --retries=5 CMD curl --fail http://localhost:5000/api/3/action/status_show || exit CMD ["/srv/app/start_ckan.sh"] + +CMD ["/srv/app/start_ckan.sh"] From 12009ec159ea34ca595e1dc4fdea2aaedcd3f926 Mon Sep 17 00:00:00 2001 From: Marija <93824048+MarijaKnezevic@users.noreply.github.com> Date: Tue, 4 Feb 2025 16:49:49 +0100 Subject: [PATCH 32/95] =?UTF-8?q?Update=20Dockerfile=20=E2=80=93=20Keep=20?= =?UTF-8?q?plugins=20only=20for=20sddi-base?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sddi-base/Dockerfile | 131 +------------------------------------------ 1 file changed, 1 insertion(+), 130 deletions(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index e91ea5f5..b4798d1e 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -46,19 +46,6 @@ ENV ENVVARS_GIT_BRANCH=v0.0.6 RUN set -ex && \ pip3 wheel --wheel-dir=/wheels git+${ENVVARS_GIT_URL}@${ENVVARS_GIT_BRANCH}#egg=ckanext-envvars -# ckanext-relation ############################################################ -ARG CKANEXT_RELATION_VERSION="1.1.0" -ENV CKANEXT_RELATION_VERSION=${CKANEXT_RELATION_VERSION} - -RUN set -ex && \ - pip wheel --wheel-dir=/wheels \ - git+https://github.com/tum-gis/ckanext-relation-sddi.git@${CKANEXT_RELATION_VERSION}#egg=ckanext-relation && \ - pip wheel --wheel-dir=/wheels -r \ - https://raw.githubusercontent.com/tum-gis/ckanext-relation-sddi/${CKANEXT_RELATION_VERSION}/requirements.txt && \ - curl -o /wheels/ckanext-relation.txt \ - https://raw.githubusercontent.com/tum-gis/ckanext-relation-sddi/${CKANEXT_RELATION_VERSION}/requirements.txt && \ - ls -lah /wheels - # ckanext-scheming ############################################################ ARG CKANEXT_SCHEMING_VERSION="27035f4" ENV CKANEXT_SCHEMING_VERSION=${CKANEXT_SCHEMING_VERSION} @@ -68,40 +55,6 @@ RUN set -ex && \ pip wheel --wheel-dir=/wheels \ git+${CKANEXT_SCHEMING_GITHUB_URL}.git@${CKANEXT_SCHEMING_VERSION}#egg=ckanext-scheming -# ckanext datesearch ########################################################## -ARG CKANEXT_DATESEARCH_VERSION="1.1.1" -ENV CKANEXT_DATESEARCH_VERSION=${CKANEXT_DATESEARCH_VERSION} -ENV CKANEXT_DATESEARCH_VERSION_GITHUB_URL="https://github.com/MarijaKnezevic/ckanext-datesearch" - -RUN set -ex && \ - pip wheel --wheel-dir=/wheels \ - git+${CKANEXT_DATESEARCH_VERSION_GITHUB_URL}.git@${CKANEXT_DATESEARCH_VERSION}#egg=ckanext-datesearch - -# ckanext-harvest ########################################################### -# ARG CKANEXT_HARVEST_VERSION="v1.6.1" -# ENV CKANEXT_HARVEST_VERSION=${CKANEXT_HARVEST_VERSION} -# ENV CKANEXT_HARVEST_GITHUB_URL="https://github.com/ckan/ckanext-harvest.git" - -# RUN set -ex && \ -# mkdir -p /wheels && \ -# pip install -r https://raw.githubusercontent.com/ckan/ckanext-harvest/${CKANEXT_HARVEST_VERSION}/requirements.txt - -# RUN set -ex && \ -# pip wheel --wheel-dir=/wheels -r https://raw.githubusercontent.com/ckan/ckanext-harvest/${CKANEXT_HARVEST_VERSION}/requirements.txt && \ -# pip wheel --wheel-dir=/wheels git+https://github.com/ckan/ckanext-harvest.git@${CKANEXT_HARVEST_VERSION}#egg=ckanext-harvest && \ -# curl -o /wheels/ckanext-harvest.txt https://raw.githubusercontent.com/ckan/ckanext-harvest/${CKANEXT_HARVEST_VERSION}/requirements.txt && \ -# ls -lah /wheels - -# ckanext-spatial ############################################################# -ENV CKANEXT_SPATIAL_GITHUB_URL="https://github.com/ckan/ckanext-spatial" -ENV CKANEXT_SPATIAL_VERSION="v2.2.0" - -RUN set -ex && \ - curl -o /wheels/ckanext-spatial-requirements.txt \ - https://raw.githubusercontent.com/ckan/ckanext-spatial/${CKANEXT_SPATIAL_VERSION}/requirements-py2.txt && \ - pip wheel --wheel-dir=/wheels \ - git+${CKANEXT_SPATIAL_GITHUB_URL}.git@${CKANEXT_SPATIAL_VERSION}#egg=ckanext-spatial - # ckanext-geoview ############################################################# ARG CKANEXT_GEOVIEW_VERSION="v0.2.2" ENV CKANEXT_GEOVIEW_VERSION=${CKANEXT_GEOVIEW_VERSION} @@ -114,18 +67,6 @@ RUN set -ex && \ pip wheel --wheel-dir=/wheels \ git+${CKANEXT_GEOVIEW_GITHUB_URL}.git@${CKANEXT_GEOVIEW_VERSION}#egg=ckanext-geoview -# ckanext-theme-sddi ############################################################# -ARG CKANEXT_THEME_SDDI_VERSION="0.0.3" -ENV CKANEXT_THEME_SDDI_VERSION=${CKANEXT_THEME_SDDI_VERSION} -ENV CKANEXT_THEME_SDDI_GITHUB_URL="https://github.com/MarijaKnezevic/ckanext-theme-sddi" - -RUN set -ex && \ - curl -o /wheels/ckanext-theme-sddi-dev-requirements.txt \ - ${CKANEXT_THEME_SDDI_GITHUB_URL}/raw/${CKANEXT_THEME_SDDI_VERSION}/requirements.txt && \ - pip install -r /wheels/ckanext-theme-sddi-dev-requirements.txt && \ - pip wheel --wheel-dir=/wheels \ - git+${CKANEXT_THEME_SDDI_GITHUB_URL}.git@${CKANEXT_THEME_SDDI_VERSION}#egg=ckanext-theme-sddi - # ckanext-clamav ############################################################# ARG CKANEXT_CLAMAV_VERSION="a1d23ac" ENV CKANEXT_CLAMAV_VERSION=${CKANEXT_CLAMAV_VERSION} @@ -150,18 +91,6 @@ RUN set -ex && \ pip wheel --wheel-dir=/wheels \ git+${CKANEXT_DCAT_GITHUB_URL}.git@${CKANEXT_DCAT_VERSION}#egg=ckanext-dcat -# ckanext-security ###################################################### -ARG CKANEXT_SECURITY_VERSION="afc39c2" -ENV CKANEXT_SECURITY_VERSION=${CKANEXT_SECURITY_VERSION} -ENV CKANEXT_SECURITY_GITHUB_URL="https://github.com/MarijaKnezevic/ckanext-security" - -RUN set -ex && \ - curl -o /wheels/ckanext-security-requirements.txt \ - https://raw.githubusercontent.com/MarijaKnezevic/ckanext-security/${CKANEXT_SECURITY_VERSION}/requirements.txt && \ - pip install -r /wheels/ckanext-security-requirements.txt && \ - pip wheel --wheel-dir=/wheels \ - git+${CKANEXT_SECURITY_GITHUB_URL}.git@${CKANEXT_SECURITY_VERSION}#egg=ckanext-security - ############################################################################### # Runtime stage ############################################################################### @@ -240,11 +169,6 @@ RUN set -ex pip install markupsafe==2.0.1 \ WORKDIR ${CKAN_DIR} -# ckanext-harvest ########################################################### -# RUN set -ex && \ -# pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-harvest && \ -# pip install --no-index --find-links=${APP_DIR}/ext_wheels -r ${APP_DIR}/ext_wheels/ckanext-harvest.txt - # ckanext-hierarchy ########################################################### RUN set -ex && \ pip install --find-links=${APP_DIR}/ext_wheels -r ${APP_DIR}/ext_wheels/ckanext-hierarchy.txt && \ @@ -254,39 +178,14 @@ RUN set -ex && \ RUN set -ex && \ pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-envvars -# ckanext-relation ############################################################ -RUN set -ex && \ - pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-relation - # ckanext-scheming ############################################################ RUN set -ex && \ pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-scheming -# ckanext-datesearch ########################################################## -RUN set -ex && \ - pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-datesearch - -# ckanext-spatial ############################################################# -RUN set -ex && \ - pip3 install -e 'git+https://github.com/ckan/ckanext-spatial.git#egg=ckanext-spatial' && \ - pip3 install -r 'https://raw.githubusercontent.com/ckan/ckanext-spatial/master/requirements.txt' - # ckanext-geoview ############################################################# RUN set -ex && \ pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-geoview -# ckanext-scheme-sddi ############################################################ -RUN set -ex && \ - pip install -e "git+https://github.com/MarijaKnezevic/ckanext-scheme-sddi@0.0.1#egg=ckanext-scheme-sddi" - -# ckanext-theme-sddi ############################################################# -RUN set -ex && \ - pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-theme-sddi - -# ckanext-heroslideradmin ############################################################# -RUN set -ex && \ - pip install -e "git+https://github.com/dathere/ckanext-heroslideradmin.git@4b60e00#egg=ckanext-heroslideradmin" - # ckanext-clamav ############################################################# RUN set -ex && \ pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-clamav @@ -296,25 +195,11 @@ RUN set -ex && \ pip install --find-links=${APP_DIR}/ext_wheels -r ${APP_DIR}/ext_wheels/ckanext-dcat-requirements.txt && \ pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-dcat -# ckanext-security ###################################################### -RUN set -ex && \ - pip install --find-links=${APP_DIR}/ext_wheels -r ${APP_DIR}/ext_wheels/ckanext-security-requirements.txt && \ - pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-security - ENV CKAN__PLUGINS "envvars image_view text_view webpage_view datastore \ activity \ - security \ - # harvest ckan_harvester \ hierarchy_display hierarchy_form \ - relation \ - spatial_metadata spatial_query \ - datesearch \ - scheme_sddi \ - theme_sddi \ scheming_datasets \ geo_view geojson_view wmts_view shp_view \ - heroslideradmin \ - # dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface \ dcat dcat_json_interface \ clamav" @@ -323,25 +208,11 @@ RUN set -ex && \ RUN set -ex && \ ckan config-tool "${CKAN_INI}" "ckan.plugins = ${CKAN__PLUGINS}" && \ - ckan config-tool "${CKAN_INI}" "ckan.spatial.srid = 4326" && \ - ckan config-tool "${CKAN_INI}" "ckanext.spatial.search_backend = solr-bbox" && \ - ckan config-tool "${CKAN_INI}" "ckanext.spatial.use_postgis_sorting = true" && \ ckan config-tool "${CKAN_INI}" "scheming.dataset_schemas = ckanext.scheme_sddi:sddi_dataset.yaml" && \ ckan config-tool "${CKAN_INI}" "scheming.presets = ckanext.scheming:presets.json ckanext.scheme_sddi:sddi_presets.json" && \ ckan config-tool "${CKAN_INI}" "scheming.dataset_fallback = false" && \ ckan config-tool "${CKAN_INI}" "ckanext.dathere_theme.column_count = 4" && \ - ckan config-tool "${CKAN_INI}" "ckanext.spatial.common_map.type = custom" && \ - ckan config-tool "${CKAN_INI}" "ckanext.spatial.common_map.custom.url = https://tile.openstreetmap.de/{z}/{x}/{y}.png" && \ - ckan config-tool "${CKAN_INI}" "ckanext.spatial.common_map.attribution = OpenStreetMap contributors." && \ - ckan config-tool "${CKAN_INI}" "ckanext.security.lock_timeout = 900" && \ - ckan config-tool "${CKAN_INI}" "ckanext.security.login_max_count = 3" && \ - ckan config-tool "${CKAN_INI}" "ckanext.security.brute_force_key = user_name" && \ - ckan config-tool "${CKAN_INI}" "ckanext.security.disable_password_reset_override = true" && \ - ckan config-tool "${CKAN_INI}" "ckanext.security.enable_totp = true" && \ ckan config-tool "${CKAN_INI}" "ckanext.dcat.enable_content_negotiation = True" && \ -# ckan config-tool "${CKAN_INI}" "ckan.harvest.log_scope = 0" && \ -# ckan config-tool "${CKAN_INI}" "ckan.harvest.log_level = debug" && \ -# ckan config-tool "${CKAN_INI}" "ckan.harvest.log_timeframe = 10" && \ ckan config-tool "${CKAN_INI}" "PERMANENT_SESSION_LIFETIME = 600" # Remove wheels @@ -357,4 +228,4 @@ EXPOSE 5000 HEALTHCHECK --interval=60s --timeout=5s --retries=5 CMD curl --fail http://localhost:5000/api/3/action/status_show || exit CMD ["/srv/app/start_ckan.sh"] -CMD ["/srv/app/start_ckan.sh"] \ No newline at end of file +CMD ["/srv/app/start_ckan.sh"] From 27df54587dbd5389351166cffec75297b0314386 Mon Sep 17 00:00:00 2001 From: Marija <93824048+MarijaKnezevic@users.noreply.github.com> Date: Thu, 13 Feb 2025 16:03:53 +0100 Subject: [PATCH 33/95] Adding tracking --- sddi/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/sddi/Dockerfile b/sddi/Dockerfile index 94dc8404..c62cc19b 100644 --- a/sddi/Dockerfile +++ b/sddi/Dockerfile @@ -302,6 +302,7 @@ RUN set -ex && \ pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-security ENV CKAN__PLUGINS "envvars image_view text_view webpage_view datastore \ + tracking \ activity \ security \ # harvest ckan_harvester \ From 33ea4fd7218a1ad16d516211f0b14598112221bb Mon Sep 17 00:00:00 2001 From: Marija <93824048+MarijaKnezevic@users.noreply.github.com> Date: Thu, 13 Feb 2025 16:05:02 +0100 Subject: [PATCH 34/95] Update Security --- sddi/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sddi/Dockerfile b/sddi/Dockerfile index c62cc19b..c3d10fa8 100644 --- a/sddi/Dockerfile +++ b/sddi/Dockerfile @@ -151,7 +151,7 @@ RUN set -ex && \ git+${CKANEXT_DCAT_GITHUB_URL}.git@${CKANEXT_DCAT_VERSION}#egg=ckanext-dcat # ckanext-security ###################################################### -ARG CKANEXT_SECURITY_VERSION="afc39c2" +ARG CKANEXT_SECURITY_VERSION="5724341" ENV CKANEXT_SECURITY_VERSION=${CKANEXT_SECURITY_VERSION} ENV CKANEXT_SECURITY_GITHUB_URL="https://github.com/MarijaKnezevic/ckanext-security" From 091feb54f612639151200936722dcc8903267391 Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Fri, 14 Feb 2025 20:42:28 +0100 Subject: [PATCH 35/95] CKAN build version solve --- sddi/Dockerfile | 64 ++++++++++--------------------------------------- 1 file changed, 13 insertions(+), 51 deletions(-) diff --git a/sddi/Dockerfile b/sddi/Dockerfile index c3d10fa8..1e434640 100644 --- a/sddi/Dockerfile +++ b/sddi/Dockerfile @@ -1,20 +1,20 @@ ############################################################################### # Extbuild stage ############################################################################### -FROM ckan/ckan-base:2.11.1 as extbuild +ARG CKAN_VERSION_BUILD_STAGE=2.11.1 +ARG CKAN_VERSION_BUILD_SPATIAL=2.11.1-focal +ARG CKAN_VERSION_RUNTIME_STAGE=2.11.1-focal + +FROM ckan/ckan-base:${CKAN_VERSION_BUILD_STAGE} as extbuild USER root RUN apt-get update && apt-get install -y \ - git \ curl \ - libpq-dev \ gcc \ make \ - g++ \ autoconf \ automake \ - libtool \ patch \ musl-dev \ libpcre3-dev \ @@ -40,11 +40,11 @@ RUN set -ex && \ ls -lah /wheels # ckanext-envvars -ENV ENVVARS_GIT_URL=https://github.com/ckan/ckanext-envvars/ -ENV ENVVARS_GIT_BRANCH=v0.0.6 +ARG CKANEXT_ENVVARS_VERSION="v0.0.6" +ENV CKANEXT_ENVVARS_VERSION=${CKANEXT_ENVVARS_VERSION} RUN set -ex && \ - pip3 wheel --wheel-dir=/wheels git+${ENVVARS_GIT_URL}@${ENVVARS_GIT_BRANCH}#egg=ckanext-envvars + pip wheel --wheel-dir=/wheels git+https://github.com/ckan/ckanext-envvars.git@${CKANEXT_ENVVARS_VERSION}#egg=ckanext-envvars # ckanext-relation ############################################################ ARG CKANEXT_RELATION_VERSION="1.1.0" @@ -77,21 +77,6 @@ RUN set -ex && \ pip wheel --wheel-dir=/wheels \ git+${CKANEXT_DATESEARCH_VERSION_GITHUB_URL}.git@${CKANEXT_DATESEARCH_VERSION}#egg=ckanext-datesearch -# ckanext-harvest ########################################################### -# ARG CKANEXT_HARVEST_VERSION="v1.6.1" -# ENV CKANEXT_HARVEST_VERSION=${CKANEXT_HARVEST_VERSION} -# ENV CKANEXT_HARVEST_GITHUB_URL="https://github.com/ckan/ckanext-harvest.git" - -# RUN set -ex && \ -# mkdir -p /wheels && \ -# pip install -r https://raw.githubusercontent.com/ckan/ckanext-harvest/${CKANEXT_HARVEST_VERSION}/requirements.txt - -# RUN set -ex && \ -# pip wheel --wheel-dir=/wheels -r https://raw.githubusercontent.com/ckan/ckanext-harvest/${CKANEXT_HARVEST_VERSION}/requirements.txt && \ -# pip wheel --wheel-dir=/wheels git+https://github.com/ckan/ckanext-harvest.git@${CKANEXT_HARVEST_VERSION}#egg=ckanext-harvest && \ -# curl -o /wheels/ckanext-harvest.txt https://raw.githubusercontent.com/ckan/ckanext-harvest/${CKANEXT_HARVEST_VERSION}/requirements.txt && \ -# ls -lah /wheels - # ckanext-spatial ############################################################# ENV CKANEXT_SPATIAL_GITHUB_URL="https://github.com/ckan/ckanext-spatial" ENV CKANEXT_SPATIAL_VERSION="v2.2.0" @@ -165,7 +150,7 @@ RUN set -ex && \ ############################################################################### # Runtime stage ############################################################################### -FROM ckan/ckan-base:2.11.1 +FROM ckan/ckan-base:${CKAN_VERSION_BUILD_STAGE} ENV APP_DIR=/srv/app ENV SRC_DIR=/srv/app/src @@ -180,21 +165,13 @@ USER root # Setting the locale ENV LC_ALL="en_US.UTF-8" -RUN apt-get update && apt-get install --no-install-recommends -y locales -RUN sed -i "/$LC_ALL/s/^# //g" /etc/locale.gen -RUN dpkg-reconfigure --frontend=noninteractive locales RUN update-locale LANG=${LC_ALL} -# Set timezone -RUN echo "UTC" > /etc/timezone - # Update the package lists and install required packages RUN apt-get update && apt-get install -y \ bash \ - git \ gettext \ curl \ - wget \ unzip \ postgresql-client \ libmagic1 \ @@ -216,19 +193,12 @@ RUN apt-get update && apt-get install -y \ # Cleanup to reduce image size RUN apt-get clean && rm -rf /var/lib/apt/lists/* -# Create SRC_DIR -RUN mkdir -p ${SRC_DIR} && \ - # Link python to python3 - ln -s /usr/bin/python3 /usr/bin/python +# Link python to python3 +RUN ln -s /usr/bin/python3 /usr/bin/python # Get artifacts from build stages COPY --from=extbuild /wheels ${APP_DIR}/ext_wheels -# Create local storage folder -RUN mkdir -p ${CKAN_STORAGE_PATH} && \ - chown -R ckan:ckan-sys ${CKAN_STORAGE_PATH} && \ - chown -R ckan:ckan-sys ${APP_DIR} - USER ckan RUN set -ex pip install markupsafe==2.0.1 \ @@ -240,11 +210,6 @@ RUN set -ex pip install markupsafe==2.0.1 \ WORKDIR ${CKAN_DIR} -# ckanext-harvest ########################################################### -# RUN set -ex && \ -# pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-harvest && \ -# pip install --no-index --find-links=${APP_DIR}/ext_wheels -r ${APP_DIR}/ext_wheels/ckanext-harvest.txt - # ckanext-hierarchy ########################################################### RUN set -ex && \ pip install --find-links=${APP_DIR}/ext_wheels -r ${APP_DIR}/ext_wheels/ckanext-hierarchy.txt && \ @@ -268,8 +233,8 @@ RUN set -ex && \ # ckanext-spatial ############################################################# RUN set -ex && \ - pip3 install -e 'git+https://github.com/ckan/ckanext-spatial.git#egg=ckanext-spatial' && \ - pip3 install -r 'https://raw.githubusercontent.com/ckan/ckanext-spatial/master/requirements.txt' + pip install -e 'git+https://github.com/ckan/ckanext-spatial.git#egg=ckanext-spatial' && \ + pip install -r 'https://raw.githubusercontent.com/ckan/ckanext-spatial/master/requirements.txt' # ckanext-geoview ############################################################# RUN set -ex && \ @@ -340,9 +305,6 @@ RUN set -ex && \ ckan config-tool "${CKAN_INI}" "ckanext.security.disable_password_reset_override = true" && \ ckan config-tool "${CKAN_INI}" "ckanext.security.enable_totp = true" && \ ckan config-tool "${CKAN_INI}" "ckanext.dcat.enable_content_negotiation = True" && \ -# ckan config-tool "${CKAN_INI}" "ckan.harvest.log_scope = 0" && \ -# ckan config-tool "${CKAN_INI}" "ckan.harvest.log_level = debug" && \ -# ckan config-tool "${CKAN_INI}" "ckan.harvest.log_timeframe = 10" && \ ckan config-tool "${CKAN_INI}" "PERMANENT_SESSION_LIFETIME = 600" # Remove wheels From 2c85f3a42eebda61489f0aab6f88e5cf87c3bea1 Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Wed, 12 Feb 2025 21:04:38 +0100 Subject: [PATCH 36/95] Add dev image cleanup workflow --- .github/workflows/cleanup-dev-images.yml | 49 ++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/cleanup-dev-images.yml diff --git a/.github/workflows/cleanup-dev-images.yml b/.github/workflows/cleanup-dev-images.yml new file mode 100644 index 00000000..9916cf5f --- /dev/null +++ b/.github/workflows/cleanup-dev-images.yml @@ -0,0 +1,49 @@ +name: Cleanup dev images of merged PRs + +on: + schedule: + - cron: "0 2 * * *" # Runs daily at 2 AM UTC + workflow_dispatch: # Allows manual triggering + +jobs: + cleanup-ghcr: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Get Image Tags from GHCR + run: | + IMAGE_OWNER="${{ github.repository_owner }}" + IMAGE_NAME="ckan-sddi-dev" + GHCR_API="https://ghcr.io/v2/$IMAGE_OWNER/$IMAGE_NAME/tags/list" + TAGS=$(curl -s -H "Authorization: Bearer $(echo ${{ secrets.GITHUB_TOKEN }} | base64)" "$GHCR_API" | jq -r '.tags[]') + echo "TAGS=$TAGS" >> $GITHUB_ENV + + - name: Identify Merged PRs + run: | + MAPPED_TAGS=() + for TAG in $TAGS; do + if [[ $TAG =~ ^[a-zA-Z0-9]+-pr-(\d+)(?:-[a-f0-9]+)?$ ]]; then + PR_NUMBER=${BASH_REMATCH[1]} + RESPONSE=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + "https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER") + MERGED=$(echo "$RESPONSE" | jq -r '.merged') + if [[ "$MERGED" == "true" ]]; then + MAPPED_TAGS+=("$TAG") + fi + fi + done + echo "DELETE_TAGS=${MAPPED_TAGS[*]}" >> $GITHUB_ENV + echo "Images to be deleted: ${MAPPED_TAGS[*]}" + + - name: Delete Merged PR Images + if: env.DELETE_TAGS != '' + run: | + echo "Deleting the following images: $DELETE_TAGS" + for TAG in $DELETE_TAGS; do + IMAGE_OWNER="${{ github.repository_owner }}" + IMAGE_NAME="your-image-name" + GHCR_DELETE_URL="https://ghcr.io/v2/$IMAGE_OWNER/$IMAGE_NAME/manifests/$(curl -s -H "Authorization: Bearer $(echo ${{ secrets.GITHUB_TOKEN }} | base64)" -H "Accept: application/vnd.oci.image.manifest.v1+json" "https://ghcr.io/v2/$IMAGE_OWNER/$IMAGE_NAME/manifests/$TAG" | jq -r '.config.digest')" + curl -X DELETE -H "Authorization: Bearer $(echo ${{ secrets.GITHUB_TOKEN }} | base64)" "$GHCR_DELETE_URL" + done From 3275b2f51fbc2cbab5f5763c33945209e968daf6 Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Wed, 12 Feb 2025 21:16:44 +0100 Subject: [PATCH 37/95] fix multiline string issue --- .github/workflows/cleanup-dev-images.yml | 37 +++++++++++++++--------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/.github/workflows/cleanup-dev-images.yml b/.github/workflows/cleanup-dev-images.yml index 9916cf5f..3aba1f5d 100644 --- a/.github/workflows/cleanup-dev-images.yml +++ b/.github/workflows/cleanup-dev-images.yml @@ -15,15 +15,15 @@ jobs: - name: Get Image Tags from GHCR run: | IMAGE_OWNER="${{ github.repository_owner }}" - IMAGE_NAME="ckan-sddi-dev" + IMAGE_NAME="ckan-sdd-dev" GHCR_API="https://ghcr.io/v2/$IMAGE_OWNER/$IMAGE_NAME/tags/list" TAGS=$(curl -s -H "Authorization: Bearer $(echo ${{ secrets.GITHUB_TOKEN }} | base64)" "$GHCR_API" | jq -r '.tags[]') - echo "TAGS=$TAGS" >> $GITHUB_ENV + echo "$TAGS" > tags_list.txt - name: Identify Merged PRs run: | MAPPED_TAGS=() - for TAG in $TAGS; do + while read -r TAG; do if [[ $TAG =~ ^[a-zA-Z0-9]+-pr-(\d+)(?:-[a-f0-9]+)?$ ]]; then PR_NUMBER=${BASH_REMATCH[1]} RESPONSE=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ @@ -33,17 +33,26 @@ jobs: MAPPED_TAGS+=("$TAG") fi fi - done - echo "DELETE_TAGS=${MAPPED_TAGS[*]}" >> $GITHUB_ENV - echo "Images to be deleted: ${MAPPED_TAGS[*]}" + done < tags_list.txt + printf "%s\n" "${MAPPED_TAGS[@]}" > delete_tags.txt + echo "Images to be deleted:" && cat delete_tags.txt - name: Delete Merged PR Images - if: env.DELETE_TAGS != '' + if: ${{ always() }} run: | - echo "Deleting the following images: $DELETE_TAGS" - for TAG in $DELETE_TAGS; do - IMAGE_OWNER="${{ github.repository_owner }}" - IMAGE_NAME="your-image-name" - GHCR_DELETE_URL="https://ghcr.io/v2/$IMAGE_OWNER/$IMAGE_NAME/manifests/$(curl -s -H "Authorization: Bearer $(echo ${{ secrets.GITHUB_TOKEN }} | base64)" -H "Accept: application/vnd.oci.image.manifest.v1+json" "https://ghcr.io/v2/$IMAGE_OWNER/$IMAGE_NAME/manifests/$TAG" | jq -r '.config.digest')" - curl -X DELETE -H "Authorization: Bearer $(echo ${{ secrets.GITHUB_TOKEN }} | base64)" "$GHCR_DELETE_URL" - done + if [ -s delete_tags.txt ]; then + echo "Deleting the following images:" && cat delete_tags.txt + while read -r TAG; do + IMAGE_OWNER="${{ github.repository_owner }}" + IMAGE_NAME="your-image-name" + DIGEST=$(curl -s -H "Authorization: Bearer $(echo ${{ secrets.GITHUB_TOKEN }} | base64)" \ + -H "Accept: application/vnd.oci.image.manifest.v1+json" \ + "https://ghcr.io/v2/$IMAGE_OWNER/$IMAGE_NAME/manifests/$TAG" | jq -r '.config.digest') + if [ "$DIGEST" != "null" ]; then + GHCR_DELETE_URL="https://ghcr.io/v2/$IMAGE_OWNER/$IMAGE_NAME/manifests/$DIGEST" + curl -X DELETE -H "Authorization: Bearer $(echo ${{ secrets.GITHUB_TOKEN }} | base64)" "$GHCR_DELETE_URL" + fi + done < delete_tags.txt + else + echo "No images to delete." + fi From 8206c2afde57b35abb7ec4198f75dfa39c6127a2 Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Wed, 12 Feb 2025 21:19:01 +0100 Subject: [PATCH 38/95] fix typo --- .github/workflows/cleanup-dev-images.yml | 2 +- ckan-docker-lhm | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 160000 ckan-docker-lhm diff --git a/.github/workflows/cleanup-dev-images.yml b/.github/workflows/cleanup-dev-images.yml index 3aba1f5d..d1e0a17f 100644 --- a/.github/workflows/cleanup-dev-images.yml +++ b/.github/workflows/cleanup-dev-images.yml @@ -15,7 +15,7 @@ jobs: - name: Get Image Tags from GHCR run: | IMAGE_OWNER="${{ github.repository_owner }}" - IMAGE_NAME="ckan-sdd-dev" + IMAGE_NAME="ckan-sddi-dev" GHCR_API="https://ghcr.io/v2/$IMAGE_OWNER/$IMAGE_NAME/tags/list" TAGS=$(curl -s -H "Authorization: Bearer $(echo ${{ secrets.GITHUB_TOKEN }} | base64)" "$GHCR_API" | jq -r '.tags[]') echo "$TAGS" > tags_list.txt diff --git a/ckan-docker-lhm b/ckan-docker-lhm new file mode 160000 index 00000000..39920891 --- /dev/null +++ b/ckan-docker-lhm @@ -0,0 +1 @@ +Subproject commit 39920891b2da042703298f0d7e895765a97ab045 From 0159b74891997b46960c98daa013832972d1964a Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Wed, 12 Feb 2025 21:23:15 +0100 Subject: [PATCH 39/95] use env vars for image name --- .github/workflows/cleanup-dev-images.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cleanup-dev-images.yml b/.github/workflows/cleanup-dev-images.yml index d1e0a17f..59c4fb6a 100644 --- a/.github/workflows/cleanup-dev-images.yml +++ b/.github/workflows/cleanup-dev-images.yml @@ -5,6 +5,10 @@ on: - cron: "0 2 * * *" # Runs daily at 2 AM UTC workflow_dispatch: # Allows manual triggering +env: + IMAGE_NAME: ckan-sddi-dev + IMAGE_OWNER: ${{ github.repository_owner }} + jobs: cleanup-ghcr: runs-on: ubuntu-latest @@ -14,8 +18,6 @@ jobs: - name: Get Image Tags from GHCR run: | - IMAGE_OWNER="${{ github.repository_owner }}" - IMAGE_NAME="ckan-sddi-dev" GHCR_API="https://ghcr.io/v2/$IMAGE_OWNER/$IMAGE_NAME/tags/list" TAGS=$(curl -s -H "Authorization: Bearer $(echo ${{ secrets.GITHUB_TOKEN }} | base64)" "$GHCR_API" | jq -r '.tags[]') echo "$TAGS" > tags_list.txt @@ -43,8 +45,6 @@ jobs: if [ -s delete_tags.txt ]; then echo "Deleting the following images:" && cat delete_tags.txt while read -r TAG; do - IMAGE_OWNER="${{ github.repository_owner }}" - IMAGE_NAME="your-image-name" DIGEST=$(curl -s -H "Authorization: Bearer $(echo ${{ secrets.GITHUB_TOKEN }} | base64)" \ -H "Accept: application/vnd.oci.image.manifest.v1+json" \ "https://ghcr.io/v2/$IMAGE_OWNER/$IMAGE_NAME/manifests/$TAG" | jq -r '.config.digest') From fcbcaf5506eb0eb55f53299a01117d4eac9bfa52 Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Sat, 15 Feb 2025 12:10:59 +0100 Subject: [PATCH 40/95] remove invalid submodule --- ckan-docker-lhm | 1 - 1 file changed, 1 deletion(-) delete mode 160000 ckan-docker-lhm diff --git a/ckan-docker-lhm b/ckan-docker-lhm deleted file mode 160000 index 39920891..00000000 --- a/ckan-docker-lhm +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 39920891b2da042703298f0d7e895765a97ab045 From b5ac136f40ce3fade6cac8d13cc563cdfaf0ed5e Mon Sep 17 00:00:00 2001 From: Ilche Bedelovski Date: Sun, 16 Feb 2025 10:33:46 +0100 Subject: [PATCH 41/95] Fix docker build sddi and removed sddi-social build --- .github/workflows/devel.yml | 3 +- .github/workflows/edge.yml | 3 +- .github/workflows/pull-request.yml | 64 ------------------------------ .github/workflows/release.yml | 2 +- build-noCache.sh | 19 --------- build-push-noCache.sh | 24 ----------- build-push.sh | 22 ---------- build.sh | 18 --------- sddi-base/Dockerfile | 25 +++++------- sddi/Dockerfile | 15 +++++-- 10 files changed, 23 insertions(+), 172 deletions(-) diff --git a/.github/workflows/devel.yml b/.github/workflows/devel.yml index 76c06059..85b0973d 100644 --- a/.github/workflows/devel.yml +++ b/.github/workflows/devel.yml @@ -6,7 +6,6 @@ on: paths: - sddi-base/** - sddi/** - - sddi-social/** env: REGISTRY: ghcr.io @@ -17,7 +16,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - context: ['sddi-base', 'sddi', 'sddi-social'] + context: ['sddi-base', 'sddi'] fail-fast: true max-parallel: 1 permissions: diff --git a/.github/workflows/edge.yml b/.github/workflows/edge.yml index 4f0413a6..532c5f94 100644 --- a/.github/workflows/edge.yml +++ b/.github/workflows/edge.yml @@ -6,7 +6,6 @@ on: paths: - sddi-base/** - sddi/** - - sddi-social/** env: REGISTRY: ghcr.io @@ -17,7 +16,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - context: ['sddi-base', 'sddi', 'sddi-social'] + context: ['sddi-base', 'sddi'] fail-fast: true max-parallel: 1 permissions: diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 405b6357..82f034a4 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -5,7 +5,6 @@ on: paths: - sddi-base/** - sddi/** - - sddi-social/** env: REGISTRY: ghcr.io @@ -160,66 +159,3 @@ jobs: run: | echo "${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-pr-${{github.event.number}}-debug" echo "${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }}-debug" - - # SDDI-SOCIAL - - - name: Extract metadata (tags, labels) for docker image - id: meta-sddi-social - uses: docker/metadata-action@v4 - with: - images: | - ${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev - tags: | - type=ref,event=pr,prefix=sddi-social-pr- - type=ref,event=pr,prefix=sddi-social-pr-,suffix=-{{sha}} - labels: | - maintainer=Chair of Geoinformatics, Technical University of Munich (TUM) - org.opencontainers.image.vendor=Chair of Geoinformatics, Technical University of Munich (TUM) - org.opencontainers.image.title=ckan-sddi-social-docker-dev - - - name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-social-pr-${{github.event.number}} - uses: docker/build-push-action@v4 - with: - push: true - context: sddi-social - tags: ${{ steps.meta-sddi-social.outputs.tags }} - labels: ${{ steps.meta-sddi-social.outputs.labels }} - build-args: | - BASEIMAGE_REPOSITORY=${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev - BASEIMAGE_VERSION=sddi-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }} - - - name: Print image names - run: | - echo "${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-social-pr-${{github.event.number}}" - echo "${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-social-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }}" - - - name: Extract metadata (tags, labels) for docker image - id: meta-sddi-social-debug - uses: docker/metadata-action@v4 - with: - images: | - ${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev - tags: | - type=ref,event=pr,prefix=sddi-social-pr-,suffix=-debug - type=ref,event=pr,prefix=sddi-social-pr-,suffix=-{{sha}}-debug - labels: | - maintainer=Chair of Geoinformatics, Technical University of Munich (TUM) - org.opencontainers.image.vendor=Chair of Geoinformatics, Technical University of Munich (TUM) - org.opencontainers.image.title=ckan-sddi-social-docker-dev-debug - - - name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-social-pr-${{github.event.number}}-debug - uses: docker/build-push-action@v4 - with: - push: true - context: sddi-social - file: sddi-social/Dockerfile.debug - tags: ${{ steps.meta-sddi-social-debug.outputs.tags }} - labels: ${{ steps.meta-sddi-social-debug.outputs.labels }} - build-args: | - BASEIMAGE_REPOSITORY=${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev - BASEIMAGE_VERSION=sddi-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }} - - - name: Print image names - run: | - echo "${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-social-pr-${{github.event.number}}-debug" - echo "${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-social-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }}-debug" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d9add43a..249013c8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - context: ['sddi-base', 'sddi', 'sddi-social'] + context: ['sddi-base', 'sddi'] fail-fast: true max-parallel: 1 permissions: diff --git a/build-noCache.sh b/build-noCache.sh index 8438550f..fd49f74a 100644 --- a/build-noCache.sh +++ b/build-noCache.sh @@ -41,22 +41,3 @@ docker build . \ printf "\n\n" -# sddi-social ################################################################# -cd ../sddi-social - -# sddi-social:TAG -docker build . \ - --no-cache \ - --build-arg "BASEIMAGE_REPOSITORY=$IMAGE_REPOSITORY/ckan-sddi" \ - --build-arg BASEIMAGE_VERSION=${IMAGE_TAG} \ - -t "$IMAGE_REPOSITORY/ckan-sddi-social:${IMAGE_TAG}" - -# sddi-social:TAG-debug -docker build . \ - --no-cache \ - --build-arg "BASEIMAGE_REPOSITORY=$IMAGE_REPOSITORY/ckan-sddi" \ - --build-arg BASEIMAGE_VERSION=${IMAGE_TAG}-debug \ - -t "$IMAGE_REPOSITORY/ckan-sddi-social:${IMAGE_TAG}-debug" - -cd .. -printf "\n\n" diff --git a/build-push-noCache.sh b/build-push-noCache.sh index bcaac3c8..35512f2d 100644 --- a/build-push-noCache.sh +++ b/build-push-noCache.sh @@ -46,27 +46,3 @@ docker build . \ docker push "$IMAGE_REPOSITORY/ckan-sddi:${IMAGE_TAG}-debug" printf "\n\n" - -# sddi-social ################################################################# -cd ../sddi-social - -# sddi-social:TAG -docker build . \ - --no-cache \ - --build-arg "BASEIMAGE_REPOSITORY=$IMAGE_REPOSITORY/ckan-sddi" \ - --build-arg BASEIMAGE_VERSION=${IMAGE_TAG} \ - -t "$IMAGE_REPOSITORY/ckan-sddi-social:${IMAGE_TAG}" - -docker push "$IMAGE_REPOSITORY/ckan-sddi-social:${IMAGE_TAG}" - -# sddi-social:TAG-debug -docker build . \ - --no-cache \ - --build-arg "BASEIMAGE_REPOSITORY=$IMAGE_REPOSITORY/ckan-sddi" \ - --build-arg BASEIMAGE_VERSION=${IMAGE_TAG}-debug \ - -t "$IMAGE_REPOSITORY/ckan-sddi-social:${IMAGE_TAG}-debug" - -docker push "$IMAGE_REPOSITORY/ckan-sddi-social:${IMAGE_TAG}-debug" - -cd .. -printf "\n\n" diff --git a/build-push.sh b/build-push.sh index 9ec76959..e7c7cb19 100644 --- a/build-push.sh +++ b/build-push.sh @@ -42,25 +42,3 @@ docker build . \ docker push "$IMAGE_REPOSITORY/ckan-sddi:${IMAGE_TAG}-debug" printf "\n\n" - -# sddi-social ################################################################# -cd ../sddi-social - -# sddi-social:TAG -docker build . \ - --build-arg "BASEIMAGE_REPOSITORY=$IMAGE_REPOSITORY/ckan-sddi" \ - --build-arg BASEIMAGE_VERSION=${IMAGE_TAG} \ - -t "$IMAGE_REPOSITORY/ckan-sddi-social:${IMAGE_TAG}" - -docker push "$IMAGE_REPOSITORY/ckan-sddi-social:${IMAGE_TAG}" - -# sddi-social:TAG-debug -docker build . \ - --build-arg "BASEIMAGE_REPOSITORY=$IMAGE_REPOSITORY/ckan-sddi" \ - --build-arg BASEIMAGE_VERSION=${IMAGE_TAG}-debug \ - -t "$IMAGE_REPOSITORY/ckan-sddi-social:${IMAGE_TAG}-debug" - -docker push "$IMAGE_REPOSITORY/ckan-sddi-social:${IMAGE_TAG}-debug" - -cd .. -printf "\n\n" diff --git a/build.sh b/build.sh index d11e4c4b..b02c4d77 100644 --- a/build.sh +++ b/build.sh @@ -36,21 +36,3 @@ docker build . \ -t "$IMAGE_REPOSITORY/ckan-sddi:${IMAGE_TAG}-debug" printf "\n\n" - -# sddi-social ################################################################# -cd ../sddi-social - -# sddi-social:TAG -docker build . \ - --build-arg "BASEIMAGE_REPOSITORY=$IMAGE_REPOSITORY/ckan-sddi" \ - --build-arg BASEIMAGE_VERSION=${IMAGE_TAG} \ - -t "$IMAGE_REPOSITORY/ckan-sddi-social:${IMAGE_TAG}" - -# sddi-social:TAG-debug -docker build . \ - --build-arg "BASEIMAGE_REPOSITORY=$IMAGE_REPOSITORY/ckan-sddi" \ - --build-arg BASEIMAGE_VERSION=${IMAGE_TAG}-debug \ - -t "$IMAGE_REPOSITORY/ckan-sddi-social:${IMAGE_TAG}-debug" - -cd .. -printf "\n\n" diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index b4798d1e..2227b966 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -1,12 +1,15 @@ ############################################################################### # Extbuild stage ############################################################################### -FROM ckan/ckan-base:2.11.1 as extbuild +ARG CKAN_VERSION_BUILD_STAGE=2.11.1 +ARG CKAN_VERSION_BUILD_SPATIAL=2.11.1-focal +ARG CKAN_VERSION_RUNTIME_STAGE=2.11.1-focal + +FROM ckan/ckan-base:${CKAN_VERSION_BUILD_STAGE} as extbuild USER root RUN apt-get update && apt-get install -y \ - git \ curl \ libpq-dev \ gcc \ @@ -44,7 +47,7 @@ ENV ENVVARS_GIT_URL=https://github.com/ckan/ckanext-envvars/ ENV ENVVARS_GIT_BRANCH=v0.0.6 RUN set -ex && \ - pip3 wheel --wheel-dir=/wheels git+${ENVVARS_GIT_URL}@${ENVVARS_GIT_BRANCH}#egg=ckanext-envvars + pip wheel --wheel-dir=/wheels git+${ENVVARS_GIT_URL}@${ENVVARS_GIT_BRANCH}#egg=ckanext-envvars # ckanext-scheming ############################################################ ARG CKANEXT_SCHEMING_VERSION="27035f4" @@ -94,7 +97,7 @@ RUN set -ex && \ ############################################################################### # Runtime stage ############################################################################### -FROM ckan/ckan-base:2.11.1 +FROM ckan/ckan-base:${CKAN_VERSION_BUILD_STAGE} ENV APP_DIR=/srv/app ENV SRC_DIR=/srv/app/src @@ -109,21 +112,13 @@ USER root # Setting the locale ENV LC_ALL="en_US.UTF-8" -RUN apt-get update && apt-get install --no-install-recommends -y locales -RUN sed -i "/$LC_ALL/s/^# //g" /etc/locale.gen -RUN dpkg-reconfigure --frontend=noninteractive locales RUN update-locale LANG=${LC_ALL} -# Set timezone -RUN echo "UTC" > /etc/timezone - # Update the package lists and install required packages RUN apt-get update && apt-get install -y \ bash \ - git \ gettext \ curl \ - wget \ unzip \ postgresql-client \ libmagic1 \ @@ -145,10 +140,8 @@ RUN apt-get update && apt-get install -y \ # Cleanup to reduce image size RUN apt-get clean && rm -rf /var/lib/apt/lists/* -# Create SRC_DIR -RUN mkdir -p ${SRC_DIR} && \ - # Link python to python3 - ln -s /usr/bin/python3 /usr/bin/python +# Link python to python3 +RUN ln -s /usr/bin/python3 /usr/bin/python # Get artifacts from build stages COPY --from=extbuild /wheels ${APP_DIR}/ext_wheels diff --git a/sddi/Dockerfile b/sddi/Dockerfile index 1e434640..8096f2b3 100644 --- a/sddi/Dockerfile +++ b/sddi/Dockerfile @@ -10,11 +10,15 @@ FROM ckan/ckan-base:${CKAN_VERSION_BUILD_STAGE} as extbuild USER root RUN apt-get update && apt-get install -y \ + git \ curl \ + libpq-dev \ gcc \ make \ + g++ \ autoconf \ automake \ + libtool \ patch \ musl-dev \ libpcre3-dev \ @@ -39,7 +43,7 @@ RUN set -ex && \ curl -o /wheels/ckanext-hierarchy.txt https://raw.githubusercontent.com/ckan/ckanext-hierarchy/${CKANEXT_HIERARCHY_VERSION}/requirements.txt && \ ls -lah /wheels -# ckanext-envvars +# ckanext-envvars ############################################################# ARG CKANEXT_ENVVARS_VERSION="v0.0.6" ENV CKANEXT_ENVVARS_VERSION=${CKANEXT_ENVVARS_VERSION} @@ -199,6 +203,11 @@ RUN ln -s /usr/bin/python3 /usr/bin/python # Get artifacts from build stages COPY --from=extbuild /wheels ${APP_DIR}/ext_wheels +# Create local storage folder +RUN mkdir -p ${CKAN_STORAGE_PATH} && \ + chown -R ckan:ckan-sys ${CKAN_STORAGE_PATH} && \ + chown -R ckan:ckan-sys ${APP_DIR} + USER ckan RUN set -ex pip install markupsafe==2.0.1 \ @@ -270,7 +279,6 @@ ENV CKAN__PLUGINS "envvars image_view text_view webpage_view datastore \ tracking \ activity \ security \ - # harvest ckan_harvester \ hierarchy_display hierarchy_form \ relation \ spatial_metadata spatial_query \ @@ -280,7 +288,6 @@ ENV CKAN__PLUGINS "envvars image_view text_view webpage_view datastore \ scheming_datasets \ geo_view geojson_view wmts_view shp_view \ heroslideradmin \ - # dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface \ dcat dcat_json_interface \ clamav" @@ -320,4 +327,4 @@ EXPOSE 5000 HEALTHCHECK --interval=60s --timeout=5s --retries=5 CMD curl --fail http://localhost:5000/api/3/action/status_show || exit CMD ["/srv/app/start_ckan.sh"] -CMD ["/srv/app/start_ckan.sh"] +CMD ["/srv/app/start_ckan.sh"] \ No newline at end of file From cd5386285637565c1d7f9e83568967bf47a8eb28 Mon Sep 17 00:00:00 2001 From: Ilche Bedelovski Date: Sun, 16 Feb 2025 10:45:14 +0100 Subject: [PATCH 42/95] Dockerfile debug version change --- sddi-base/Dockerfile.debug | 2 +- sddi/Dockerfile.debug | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sddi-base/Dockerfile.debug b/sddi-base/Dockerfile.debug index 92b661d5..823c4a98 100644 --- a/sddi-base/Dockerfile.debug +++ b/sddi-base/Dockerfile.debug @@ -3,7 +3,7 @@ ARG BASEIMAGE_VERSION=edge FROM ${BASEIMAGE_REPOSITORY}:${BASEIMAGE_VERSION} -ARG CKAN_VERSION=2.9.9 +ARG CKAN_VERSION=2.11.1 ENV CKAN_VERSION=${CKAN_VERSION} USER root diff --git a/sddi/Dockerfile.debug b/sddi/Dockerfile.debug index c38d9756..344a2d4d 100644 --- a/sddi/Dockerfile.debug +++ b/sddi/Dockerfile.debug @@ -3,7 +3,7 @@ ARG BASEIMAGE_VERSION=edge FROM ${BASEIMAGE_REPOSITORY}:${BASEIMAGE_VERSION} -ARG CKAN_VERSION=2.9.9 +ARG CKAN_VERSION=2.11.1 ENV CKAN_VERSION=${CKAN_VERSION} USER root From c096f1142a1561d20e3dcd1806de2dfbe2b2b386 Mon Sep 17 00:00:00 2001 From: Ilche Bedelovski Date: Sun, 16 Feb 2025 17:05:05 +0100 Subject: [PATCH 43/95] Docker build debug mkdir docker-entrypoint --- sddi-base/Dockerfile | 2 +- sddi/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index 2227b966..2bb5ce36 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -215,7 +215,7 @@ RUN set -ex && \ WORKDIR ${APP_DIR} # Create entrypoint directory for children image scripts -ONBUILD RUN mkdir /docker-entrypoint.d +ONBUILD RUN mkdir -p /docker-entrypoint.d EXPOSE 5000 diff --git a/sddi/Dockerfile b/sddi/Dockerfile index 8096f2b3..c6c80074 100644 --- a/sddi/Dockerfile +++ b/sddi/Dockerfile @@ -321,7 +321,7 @@ RUN set -ex && \ WORKDIR ${APP_DIR} # Create entrypoint directory for children image scripts -ONBUILD RUN mkdir /docker-entrypoint.d +ONBUILD RUN mkdir -p /docker-entrypoint.d EXPOSE 5000 From ad89d3eafd815126bd4e6b1c13dcaf5fc62632fd Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Mon, 17 Feb 2025 13:05:54 +0100 Subject: [PATCH 44/95] Add base plugins --- sddi-base/Dockerfile | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index 2bb5ce36..c1fc6afe 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -2,8 +2,6 @@ # Extbuild stage ############################################################################### ARG CKAN_VERSION_BUILD_STAGE=2.11.1 -ARG CKAN_VERSION_BUILD_SPATIAL=2.11.1-focal -ARG CKAN_VERSION_RUNTIME_STAGE=2.11.1-focal FROM ckan/ckan-base:${CKAN_VERSION_BUILD_STAGE} as extbuild @@ -42,12 +40,12 @@ RUN set -ex && \ curl -o /wheels/ckanext-hierarchy.txt https://raw.githubusercontent.com/ckan/ckanext-hierarchy/${CKANEXT_HIERARCHY_VERSION}/requirements.txt && \ ls -lah /wheels -# ckanext-envvars -ENV ENVVARS_GIT_URL=https://github.com/ckan/ckanext-envvars/ -ENV ENVVARS_GIT_BRANCH=v0.0.6 +# ckanext-envvars ############################################################# +ARG CKANEXT_ENVVARS_VERSION="v0.0.6" +ENV CKANEXT_ENVVARS_VERSION=${CKANEXT_ENVVARS_VERSION} RUN set -ex && \ - pip wheel --wheel-dir=/wheels git+${ENVVARS_GIT_URL}@${ENVVARS_GIT_BRANCH}#egg=ckanext-envvars + pip wheel --wheel-dir=/wheels git+https://github.com/ckan/ckanext-envvars.git@${CKANEXT_ENVVARS_VERSION}#egg=ckanext-envvars # ckanext-scheming ############################################################ ARG CKANEXT_SCHEMING_VERSION="27035f4" @@ -97,7 +95,7 @@ RUN set -ex && \ ############################################################################### # Runtime stage ############################################################################### -FROM ckan/ckan-base:${CKAN_VERSION_BUILD_STAGE} +FROM ckan/ckan-base:${CKAN_VERSION_BUILD_STAGE} as runtime ENV APP_DIR=/srv/app ENV SRC_DIR=/srv/app/src @@ -189,6 +187,7 @@ RUN set -ex && \ pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-dcat ENV CKAN__PLUGINS "envvars image_view text_view webpage_view datastore \ + tracking \ activity \ hierarchy_display hierarchy_form \ scheming_datasets \ @@ -204,7 +203,6 @@ RUN set -ex && \ ckan config-tool "${CKAN_INI}" "scheming.dataset_schemas = ckanext.scheme_sddi:sddi_dataset.yaml" && \ ckan config-tool "${CKAN_INI}" "scheming.presets = ckanext.scheming:presets.json ckanext.scheme_sddi:sddi_presets.json" && \ ckan config-tool "${CKAN_INI}" "scheming.dataset_fallback = false" && \ - ckan config-tool "${CKAN_INI}" "ckanext.dathere_theme.column_count = 4" && \ ckan config-tool "${CKAN_INI}" "ckanext.dcat.enable_content_negotiation = True" && \ ckan config-tool "${CKAN_INI}" "PERMANENT_SESSION_LIFETIME = 600" From c9a9cee57dec0e9e67a7a80f1c53e8e5b6068d4e Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Mon, 17 Feb 2025 13:14:34 +0100 Subject: [PATCH 45/95] Remove sddi base plugins --- sddi/Dockerfile | 98 ++----------------------------------------------- 1 file changed, 3 insertions(+), 95 deletions(-) diff --git a/sddi/Dockerfile b/sddi/Dockerfile index c6c80074..c8bb18b6 100644 --- a/sddi/Dockerfile +++ b/sddi/Dockerfile @@ -1,9 +1,9 @@ ############################################################################### # Extbuild stage ############################################################################### +ARG BASEIMAGE_REPOSITORY=ghcr.io/tum-gis/ckan-sddi-base +ARG BASEIMAGE_VERSION=latest ARG CKAN_VERSION_BUILD_STAGE=2.11.1 -ARG CKAN_VERSION_BUILD_SPATIAL=2.11.1-focal -ARG CKAN_VERSION_RUNTIME_STAGE=2.11.1-focal FROM ckan/ckan-base:${CKAN_VERSION_BUILD_STAGE} as extbuild @@ -29,27 +29,6 @@ RUN apt-get update && apt-get install -y \ RUN pip install -U markupsafe==2.0.1 sqlalchemy==1.4.41 -# ckanext-hierarchy ########################################################### -ARG CKANEXT_HIERARCHY_VERSION="abb4e2d" -ENV CKANEXT_HIERARCHY_VERSION=${CKANEXT_HIERARCHY_VERSION} - -RUN set -ex && \ - mkdir -p /wheels && \ - pip install -r https://raw.githubusercontent.com/ckan/ckanext-hierarchy/${CKANEXT_HIERARCHY_VERSION}/dev-requirements.txt - -RUN set -ex && \ - pip wheel --wheel-dir=/wheels -r https://raw.githubusercontent.com/ckan/ckanext-hierarchy/${CKANEXT_HIERARCHY_VERSION}/requirements.txt && \ - pip wheel --wheel-dir=/wheels git+https://github.com/ckan/ckanext-hierarchy.git@${CKANEXT_HIERARCHY_VERSION}#egg=ckanext-hierarchy && \ - curl -o /wheels/ckanext-hierarchy.txt https://raw.githubusercontent.com/ckan/ckanext-hierarchy/${CKANEXT_HIERARCHY_VERSION}/requirements.txt && \ - ls -lah /wheels - -# ckanext-envvars ############################################################# -ARG CKANEXT_ENVVARS_VERSION="v0.0.6" -ENV CKANEXT_ENVVARS_VERSION=${CKANEXT_ENVVARS_VERSION} - -RUN set -ex && \ - pip wheel --wheel-dir=/wheels git+https://github.com/ckan/ckanext-envvars.git@${CKANEXT_ENVVARS_VERSION}#egg=ckanext-envvars - # ckanext-relation ############################################################ ARG CKANEXT_RELATION_VERSION="1.1.0" ENV CKANEXT_RELATION_VERSION=${CKANEXT_RELATION_VERSION} @@ -63,15 +42,6 @@ RUN set -ex && \ https://raw.githubusercontent.com/tum-gis/ckanext-relation-sddi/${CKANEXT_RELATION_VERSION}/requirements.txt && \ ls -lah /wheels -# ckanext-scheming ############################################################ -ARG CKANEXT_SCHEMING_VERSION="27035f4" -ENV CKANEXT_SCHEMING_VERSION=${CKANEXT_SCHEMING_VERSION} -ENV CKANEXT_SCHEMING_GITHUB_URL="https://github.com//ckan/ckanext-scheming" - -RUN set -ex && \ - pip wheel --wheel-dir=/wheels \ - git+${CKANEXT_SCHEMING_GITHUB_URL}.git@${CKANEXT_SCHEMING_VERSION}#egg=ckanext-scheming - # ckanext datesearch ########################################################## ARG CKANEXT_DATESEARCH_VERSION="1.1.1" ENV CKANEXT_DATESEARCH_VERSION=${CKANEXT_DATESEARCH_VERSION} @@ -91,18 +61,6 @@ RUN set -ex && \ pip wheel --wheel-dir=/wheels \ git+${CKANEXT_SPATIAL_GITHUB_URL}.git@${CKANEXT_SPATIAL_VERSION}#egg=ckanext-spatial -# ckanext-geoview ############################################################# -ARG CKANEXT_GEOVIEW_VERSION="v0.2.2" -ENV CKANEXT_GEOVIEW_VERSION=${CKANEXT_GEOVIEW_VERSION} -ENV CKANEXT_GEOVIEW_GITHUB_URL="https://github.com/ckan/ckanext-geoview" - -RUN set -ex && \ - curl -o /wheels/ckanext-geoview-dev-requirements.txt \ - ${CKANEXT_GEOVIEW_GITHUB_URL}/raw/${CKANEXT_GEOVIEW_VERSION}/dev-requirements.txt && \ - pip install -r /wheels/ckanext-geoview-dev-requirements.txt && \ - pip wheel --wheel-dir=/wheels \ - git+${CKANEXT_GEOVIEW_GITHUB_URL}.git@${CKANEXT_GEOVIEW_VERSION}#egg=ckanext-geoview - # ckanext-theme-sddi ############################################################# ARG CKANEXT_THEME_SDDI_VERSION="0.0.3" ENV CKANEXT_THEME_SDDI_VERSION=${CKANEXT_THEME_SDDI_VERSION} @@ -115,30 +73,6 @@ RUN set -ex && \ pip wheel --wheel-dir=/wheels \ git+${CKANEXT_THEME_SDDI_GITHUB_URL}.git@${CKANEXT_THEME_SDDI_VERSION}#egg=ckanext-theme-sddi -# ckanext-clamav ############################################################# -ARG CKANEXT_CLAMAV_VERSION="a1d23ac" -ENV CKANEXT_CLAMAV_VERSION=${CKANEXT_CLAMAV_VERSION} -ENV CKANEXT_CLAMAV_GITHUB_URL="https://github.com/DataShades/ckanext-clamav" - -RUN set -ex && \ - curl -o /wheels/ckanext-clamav-requirements.txt \ - ${CKANEXT_CLAMAV_GITHUB_URL}/raw/${CKANEXT_CLAMAV_VERSION}/requirements.txt && \ - pip install -r /wheels/ckanext-clamav-requirements.txt && \ - pip wheel --wheel-dir=/wheels \ - git+${CKANEXT_CLAMAV_GITHUB_URL}.git@${CKANEXT_CLAMAV_VERSION}#egg=ckanext-clamav - -# ckanext-dcat ########################################################## -ARG CKANEXT_DCAT_VERSION="v1.5.1" -ENV CKANEXT_DCAT_VERSION=${CKANEXT_DCAT_VERSION} -ENV CKANEXT_DCAT_GITHUB_URL="https://github.com/ckan/ckanext-dcat" - -RUN set -ex && \ - curl -o /wheels/ckanext-dcat-requirements.txt \ - https://raw.githubusercontent.com/ckan/ckanext-dcat/${CKANEXT_DCAT_VERSION}/requirements.txt && \ - pip install -r /wheels/ckanext-dcat-requirements.txt && \ - pip wheel --wheel-dir=/wheels \ - git+${CKANEXT_DCAT_GITHUB_URL}.git@${CKANEXT_DCAT_VERSION}#egg=ckanext-dcat - # ckanext-security ###################################################### ARG CKANEXT_SECURITY_VERSION="5724341" ENV CKANEXT_SECURITY_VERSION=${CKANEXT_SECURITY_VERSION} @@ -154,7 +88,7 @@ RUN set -ex && \ ############################################################################### # Runtime stage ############################################################################### -FROM ckan/ckan-base:${CKAN_VERSION_BUILD_STAGE} +FROM ${BASEIMAGE_REPOSITORY}:${BASEIMAGE_VERSION} ENV APP_DIR=/srv/app ENV SRC_DIR=/srv/app/src @@ -219,23 +153,10 @@ RUN set -ex pip install markupsafe==2.0.1 \ WORKDIR ${CKAN_DIR} -# ckanext-hierarchy ########################################################### -RUN set -ex && \ - pip install --find-links=${APP_DIR}/ext_wheels -r ${APP_DIR}/ext_wheels/ckanext-hierarchy.txt && \ - pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-hierarchy - -# ckanext-envvars ############################################################ -RUN set -ex && \ - pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-envvars - # ckanext-relation ############################################################ RUN set -ex && \ pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-relation -# ckanext-scheming ############################################################ -RUN set -ex && \ - pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-scheming - # ckanext-datesearch ########################################################## RUN set -ex && \ pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-datesearch @@ -245,10 +166,6 @@ RUN set -ex && \ pip install -e 'git+https://github.com/ckan/ckanext-spatial.git#egg=ckanext-spatial' && \ pip install -r 'https://raw.githubusercontent.com/ckan/ckanext-spatial/master/requirements.txt' -# ckanext-geoview ############################################################# -RUN set -ex && \ - pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-geoview - # ckanext-scheme-sddi ############################################################ RUN set -ex && \ pip install -e "git+https://github.com/MarijaKnezevic/ckanext-scheme-sddi@0.0.1#egg=ckanext-scheme-sddi" @@ -261,15 +178,6 @@ RUN set -ex && \ RUN set -ex && \ pip install -e "git+https://github.com/dathere/ckanext-heroslideradmin.git@4b60e00#egg=ckanext-heroslideradmin" -# ckanext-clamav ############################################################# -RUN set -ex && \ - pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-clamav - -# ckanext-dcat ########################################################## -RUN set -ex && \ - pip install --find-links=${APP_DIR}/ext_wheels -r ${APP_DIR}/ext_wheels/ckanext-dcat-requirements.txt && \ - pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-dcat - # ckanext-security ###################################################### RUN set -ex && \ pip install --find-links=${APP_DIR}/ext_wheels -r ${APP_DIR}/ext_wheels/ckanext-security-requirements.txt && \ From fe0d7461824a1a0725c44ece1408b451b816948e Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Mon, 17 Feb 2025 13:29:04 +0100 Subject: [PATCH 46/95] Removed symbolic link between python3 to python --- sddi/Dockerfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/sddi/Dockerfile b/sddi/Dockerfile index c8bb18b6..d4aff6b5 100644 --- a/sddi/Dockerfile +++ b/sddi/Dockerfile @@ -131,9 +131,6 @@ RUN apt-get update && apt-get install -y \ # Cleanup to reduce image size RUN apt-get clean && rm -rf /var/lib/apt/lists/* -# Link python to python3 -RUN ln -s /usr/bin/python3 /usr/bin/python - # Get artifacts from build stages COPY --from=extbuild /wheels ${APP_DIR}/ext_wheels From 78bf0b931f819e0f2af6f9d21d5a4ac365b277e5 Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Mon, 17 Feb 2025 16:15:52 +0100 Subject: [PATCH 47/95] Removed scheming config from sddi-base --- sddi-base/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index c1fc6afe..7f58aa3e 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -200,8 +200,6 @@ RUN set -ex && \ RUN set -ex && \ ckan config-tool "${CKAN_INI}" "ckan.plugins = ${CKAN__PLUGINS}" && \ - ckan config-tool "${CKAN_INI}" "scheming.dataset_schemas = ckanext.scheme_sddi:sddi_dataset.yaml" && \ - ckan config-tool "${CKAN_INI}" "scheming.presets = ckanext.scheming:presets.json ckanext.scheme_sddi:sddi_presets.json" && \ ckan config-tool "${CKAN_INI}" "scheming.dataset_fallback = false" && \ ckan config-tool "${CKAN_INI}" "ckanext.dcat.enable_content_negotiation = True" && \ ckan config-tool "${CKAN_INI}" "PERMANENT_SESSION_LIFETIME = 600" From 898ccdff6227fdd1eb1d100d0b02a252f3cfc301 Mon Sep 17 00:00:00 2001 From: Marija <93824048+MarijaKnezevic@users.noreply.github.com> Date: Mon, 17 Feb 2025 16:51:10 +0100 Subject: [PATCH 48/95] Update ckanext-security --- sddi/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sddi/Dockerfile b/sddi/Dockerfile index d4aff6b5..8774cc0f 100644 --- a/sddi/Dockerfile +++ b/sddi/Dockerfile @@ -74,7 +74,7 @@ RUN set -ex && \ git+${CKANEXT_THEME_SDDI_GITHUB_URL}.git@${CKANEXT_THEME_SDDI_VERSION}#egg=ckanext-theme-sddi # ckanext-security ###################################################### -ARG CKANEXT_SECURITY_VERSION="5724341" +ARG CKANEXT_SECURITY_VERSION="696a9d8" ENV CKANEXT_SECURITY_VERSION=${CKANEXT_SECURITY_VERSION} ENV CKANEXT_SECURITY_GITHUB_URL="https://github.com/MarijaKnezevic/ckanext-security" @@ -232,4 +232,4 @@ EXPOSE 5000 HEALTHCHECK --interval=60s --timeout=5s --retries=5 CMD curl --fail http://localhost:5000/api/3/action/status_show || exit CMD ["/srv/app/start_ckan.sh"] -CMD ["/srv/app/start_ckan.sh"] \ No newline at end of file +CMD ["/srv/app/start_ckan.sh"] From 6cc217bb3d290605f29c159144736016cac75d03 Mon Sep 17 00:00:00 2001 From: Marija <93824048+MarijaKnezevic@users.noreply.github.com> Date: Mon, 17 Feb 2025 17:02:48 +0100 Subject: [PATCH 49/95] Update Dockerfile --- sddi/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sddi/Dockerfile b/sddi/Dockerfile index 8774cc0f..c81a175e 100644 --- a/sddi/Dockerfile +++ b/sddi/Dockerfile @@ -62,7 +62,7 @@ RUN set -ex && \ git+${CKANEXT_SPATIAL_GITHUB_URL}.git@${CKANEXT_SPATIAL_VERSION}#egg=ckanext-spatial # ckanext-theme-sddi ############################################################# -ARG CKANEXT_THEME_SDDI_VERSION="0.0.3" +ARG CKANEXT_THEME_SDDI_VERSION="0.0.4" ENV CKANEXT_THEME_SDDI_VERSION=${CKANEXT_THEME_SDDI_VERSION} ENV CKANEXT_THEME_SDDI_GITHUB_URL="https://github.com/MarijaKnezevic/ckanext-theme-sddi" From 0e4e1d7a4d1839db02959dbe7c5abc05a66bd5ac Mon Sep 17 00:00:00 2001 From: Marija <93824048+MarijaKnezevic@users.noreply.github.com> Date: Mon, 17 Feb 2025 17:23:28 +0100 Subject: [PATCH 50/95] Update Dockerfile --- sddi/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sddi/Dockerfile b/sddi/Dockerfile index c81a175e..b53be2c1 100644 --- a/sddi/Dockerfile +++ b/sddi/Dockerfile @@ -74,7 +74,7 @@ RUN set -ex && \ git+${CKANEXT_THEME_SDDI_GITHUB_URL}.git@${CKANEXT_THEME_SDDI_VERSION}#egg=ckanext-theme-sddi # ckanext-security ###################################################### -ARG CKANEXT_SECURITY_VERSION="696a9d8" +ARG CKANEXT_SECURITY_VERSION="0.0.1" ENV CKANEXT_SECURITY_VERSION=${CKANEXT_SECURITY_VERSION} ENV CKANEXT_SECURITY_GITHUB_URL="https://github.com/MarijaKnezevic/ckanext-security" From ba36c05bb76008d76b81551711af22ae1dd16747 Mon Sep 17 00:00:00 2001 From: Marija <93824048+MarijaKnezevic@users.noreply.github.com> Date: Mon, 17 Feb 2025 17:24:15 +0100 Subject: [PATCH 51/95] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9273b518..27145805 100644 --- a/README.md +++ b/README.md @@ -176,8 +176,8 @@ are alway pinned to a stable release number or commit hash. | [`ckanext-datesearch`](https://github.com/MarijaKnezevic/ckanext-datesearch) | `1.1.0`|| :heavy_check_mark: | Provides the ability to search for datasets according to a given time frame. The search includes all datasets, in which the time of validity overlaps in at least one second with the search time frame. | | [`ckanext-spatial`](https://github.com/ckan/ckanext-spatial) | `v2.2.0` | |:heavy_check_mark: | Enables geospatial capabilities to CKAN instance. | | [`ckanext-scheme-sddi`](https://github.com/MarijaKnezevic/ckanext-scheme-sddi) | `0.0.1` || :heavy_check_mark: | This plugin is extending CKAN schema definition, validation, and custom field support accordingly to SDDI needs. | -| [`ckanext-theme-sddi`](https://github.com/MarijaKnezevic/ckanext-theme-sddi) | `0.0.3` | |:heavy_check_mark: | This plugin is customizing the look of SDDI CKAN instance with theme management capabilities for improved branding and user needs.| -| [`ckanext-security` ](https://github.com/MarijaKnezevic/ckanext-security) | `afc39c2` || :heavy_check_mark: | CKAN extension that enhances data access control. In the SDDI context, context is used to define the maximum number of failed logon attempts and to automatically log off after a period of inactivity.| +| [`ckanext-theme-sddi`](https://github.com/MarijaKnezevic/ckanext-theme-sddi) | `0.0.4` | |:heavy_check_mark: | This plugin is customizing the look of SDDI CKAN instance with theme management capabilities for improved branding and user needs.| +| [`ckanext-security` ](https://github.com/MarijaKnezevic/ckanext-security) | `0.0.1` || :heavy_check_mark: | CKAN extension that enhances data access control. In the SDDI context, context is used to define the maximum number of failed logon attempts and to automatically log off after a period of inactivity.| | [`ckanext-heroslideradmin` ](https://github.com/dathere/ckanext-heroslideradmin) | `4b60e00` | |:heavy_check_mark: | CKAN extension that enables the management of a hero slider on your CKAN site, allowing for dynamic display of featured content and improved visual engagement.| ## :rocket: Usage From 796a8e85e1936bf1f600374c4bcc0e0163c993e4 Mon Sep 17 00:00:00 2001 From: Marija <93824048+MarijaKnezevic@users.noreply.github.com> Date: Mon, 17 Feb 2025 17:45:20 +0100 Subject: [PATCH 52/95] Update Dockerfile --- sddi/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/sddi/Dockerfile b/sddi/Dockerfile index b53be2c1..72f96a81 100644 --- a/sddi/Dockerfile +++ b/sddi/Dockerfile @@ -229,7 +229,6 @@ WORKDIR ${APP_DIR} ONBUILD RUN mkdir -p /docker-entrypoint.d EXPOSE 5000 - HEALTHCHECK --interval=60s --timeout=5s --retries=5 CMD curl --fail http://localhost:5000/api/3/action/status_show || exit CMD ["/srv/app/start_ckan.sh"] CMD ["/srv/app/start_ckan.sh"] From 3a3102a74f373ee936d1751d2ed0a2747d0ce374 Mon Sep 17 00:00:00 2001 From: Marija <93824048+MarijaKnezevic@users.noreply.github.com> Date: Mon, 17 Feb 2025 20:10:01 +0100 Subject: [PATCH 53/95] Update Dockerfile --- sddi-base/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index 7f58aa3e..dbbec8b0 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -68,7 +68,7 @@ RUN set -ex && \ pip wheel --wheel-dir=/wheels \ git+${CKANEXT_GEOVIEW_GITHUB_URL}.git@${CKANEXT_GEOVIEW_VERSION}#egg=ckanext-geoview -# ckanext-clamav ############################################################# +# ckanext-clamav ############################################################ ARG CKANEXT_CLAMAV_VERSION="a1d23ac" ENV CKANEXT_CLAMAV_VERSION=${CKANEXT_CLAMAV_VERSION} ENV CKANEXT_CLAMAV_GITHUB_URL="https://github.com/DataShades/ckanext-clamav" From e81e77e92e157495dcd26865b1a02edfdf0510cc Mon Sep 17 00:00:00 2001 From: Ilche Bedelovski Date: Mon, 17 Feb 2025 22:19:41 +0100 Subject: [PATCH 54/95] Remove not used packages --- sddi-base/Dockerfile | 19 +------------------ sddi/Dockerfile | 20 +------------------- 2 files changed, 2 insertions(+), 37 deletions(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index dbbec8b0..2cbf2e40 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -10,9 +10,6 @@ USER root RUN apt-get update && apt-get install -y \ curl \ libpq-dev \ - gcc \ - make \ - g++ \ autoconf \ automake \ libtool \ @@ -97,13 +94,9 @@ RUN set -ex && \ ############################################################################### FROM ckan/ckan-base:${CKAN_VERSION_BUILD_STAGE} as runtime -ENV APP_DIR=/srv/app -ENV SRC_DIR=/srv/app/src ENV CKAN_DIR=${SRC_DIR}/ckan ENV DATA_DIR=/srv/app/data -ENV PIP_SRC=${SRC_DIR} ENV CKAN_INI=${APP_DIR}/production.ini -ENV CKAN_STORAGE_PATH=/var/lib/ckan ENV UWSGI_HARAKIRI=50 USER root @@ -118,7 +111,6 @@ RUN apt-get update && apt-get install -y \ gettext \ curl \ unzip \ - postgresql-client \ libmagic1 \ libpcre3 \ libxslt1.1 \ @@ -131,9 +123,7 @@ RUN apt-get update && apt-get install -y \ libproj-dev \ proj-data \ python3-cffi \ - uwsgi-plugin-python3 \ - supervisor \ - sudo + uwsgi-plugin-python3 # Cleanup to reduce image size RUN apt-get clean && rm -rf /var/lib/apt/lists/* @@ -151,13 +141,6 @@ RUN mkdir -p ${CKAN_STORAGE_PATH} && \ USER ckan -RUN set -ex pip install markupsafe==2.0.1 \ - setuptools \ - wheel \ - sqlalchemy==1.4.41 \ - gevent==22.10.2 \ - greenlet==2.0.1 - WORKDIR ${CKAN_DIR} # ckanext-hierarchy ########################################################### diff --git a/sddi/Dockerfile b/sddi/Dockerfile index 72f96a81..c4cceb57 100644 --- a/sddi/Dockerfile +++ b/sddi/Dockerfile @@ -10,12 +10,8 @@ FROM ckan/ckan-base:${CKAN_VERSION_BUILD_STAGE} as extbuild USER root RUN apt-get update && apt-get install -y \ - git \ curl \ libpq-dev \ - gcc \ - make \ - g++ \ autoconf \ automake \ libtool \ @@ -90,13 +86,9 @@ RUN set -ex && \ ############################################################################### FROM ${BASEIMAGE_REPOSITORY}:${BASEIMAGE_VERSION} -ENV APP_DIR=/srv/app -ENV SRC_DIR=/srv/app/src ENV CKAN_DIR=${SRC_DIR}/ckan ENV DATA_DIR=/srv/app/data -ENV PIP_SRC=${SRC_DIR} ENV CKAN_INI=${APP_DIR}/production.ini -ENV CKAN_STORAGE_PATH=/var/lib/ckan ENV UWSGI_HARAKIRI=50 USER root @@ -111,7 +103,6 @@ RUN apt-get update && apt-get install -y \ gettext \ curl \ unzip \ - postgresql-client \ libmagic1 \ libpcre3 \ libxslt1.1 \ @@ -124,9 +115,7 @@ RUN apt-get update && apt-get install -y \ libproj-dev \ proj-data \ python3-cffi \ - uwsgi-plugin-python3 \ - supervisor \ - sudo + uwsgi-plugin-python3 # Cleanup to reduce image size RUN apt-get clean && rm -rf /var/lib/apt/lists/* @@ -141,13 +130,6 @@ RUN mkdir -p ${CKAN_STORAGE_PATH} && \ USER ckan -RUN set -ex pip install markupsafe==2.0.1 \ - setuptools \ - wheel \ - sqlalchemy==1.4.41 \ - gevent==22.10.2 \ - greenlet==2.0.1 - WORKDIR ${CKAN_DIR} # ckanext-relation ############################################################ From d791bb8ccdac79ad37b6e510be901374771afb74 Mon Sep 17 00:00:00 2001 From: Marija <93824048+MarijaKnezevic@users.noreply.github.com> Date: Tue, 18 Feb 2025 13:57:59 +0100 Subject: [PATCH 55/95] Update Dockerfile --- sddi/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sddi/Dockerfile b/sddi/Dockerfile index c4cceb57..db487929 100644 --- a/sddi/Dockerfile +++ b/sddi/Dockerfile @@ -147,7 +147,7 @@ RUN set -ex && \ # ckanext-scheme-sddi ############################################################ RUN set -ex && \ - pip install -e "git+https://github.com/MarijaKnezevic/ckanext-scheme-sddi@0.0.1#egg=ckanext-scheme-sddi" + pip install -e "git+https://github.com/MarijaKnezevic/ckanext-scheme-sddi@0.0.2#egg=ckanext-scheme-sddi" # ckanext-theme-sddi ############################################################# RUN set -ex && \ From 096cf4d6ffea7fc3218f151b4c284fcd25e30229 Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Tue, 18 Feb 2025 15:47:49 +0100 Subject: [PATCH 56/95] Update sddi-base Dockerfile --- sddi-base/Dockerfile | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index 2cbf2e40..02d9d275 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -134,11 +134,6 @@ RUN ln -s /usr/bin/python3 /usr/bin/python # Get artifacts from build stages COPY --from=extbuild /wheels ${APP_DIR}/ext_wheels -# Create local storage folder -RUN mkdir -p ${CKAN_STORAGE_PATH} && \ - chown -R ckan:ckan-sys ${CKAN_STORAGE_PATH} && \ - chown -R ckan:ckan-sys ${APP_DIR} - USER ckan WORKDIR ${CKAN_DIR} @@ -200,4 +195,4 @@ EXPOSE 5000 HEALTHCHECK --interval=60s --timeout=5s --retries=5 CMD curl --fail http://localhost:5000/api/3/action/status_show || exit CMD ["/srv/app/start_ckan.sh"] -CMD ["/srv/app/start_ckan.sh"] +CMD ["/srv/app/start_ckan.sh"] \ No newline at end of file From 8200cf4bc3563b80355157aa807f7899a2b026b9 Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Tue, 18 Feb 2025 16:02:07 +0100 Subject: [PATCH 57/95] Update sddi-base Dockerfile --- sddi-base/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index 02d9d275..a241a026 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -134,6 +134,8 @@ RUN ln -s /usr/bin/python3 /usr/bin/python # Get artifacts from build stages COPY --from=extbuild /wheels ${APP_DIR}/ext_wheels +RUN chown -R ckan:ckan-sys ${APP_DIR} + USER ckan WORKDIR ${CKAN_DIR} From 7f524047801a87d055ab0ae80dd6d6db1f798880 Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Tue, 18 Feb 2025 16:10:48 +0100 Subject: [PATCH 58/95] Update sddi Dockerfile --- sddi/Dockerfile | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/sddi/Dockerfile b/sddi/Dockerfile index db487929..93df91ec 100644 --- a/sddi/Dockerfile +++ b/sddi/Dockerfile @@ -97,36 +97,13 @@ USER root ENV LC_ALL="en_US.UTF-8" RUN update-locale LANG=${LC_ALL} -# Update the package lists and install required packages -RUN apt-get update && apt-get install -y \ - bash \ - gettext \ - curl \ - unzip \ - libmagic1 \ - libpcre3 \ - libxslt1.1 \ - libxml2 \ - tzdata \ - apache2-utils \ - musl-dev \ - libssl-dev \ - proj-bin \ - libproj-dev \ - proj-data \ - python3-cffi \ - uwsgi-plugin-python3 - # Cleanup to reduce image size RUN apt-get clean && rm -rf /var/lib/apt/lists/* # Get artifacts from build stages COPY --from=extbuild /wheels ${APP_DIR}/ext_wheels -# Create local storage folder -RUN mkdir -p ${CKAN_STORAGE_PATH} && \ - chown -R ckan:ckan-sys ${CKAN_STORAGE_PATH} && \ - chown -R ckan:ckan-sys ${APP_DIR} +RUN chown -R ckan:ckan-sys ${APP_DIR} USER ckan @@ -147,7 +124,7 @@ RUN set -ex && \ # ckanext-scheme-sddi ############################################################ RUN set -ex && \ - pip install -e "git+https://github.com/MarijaKnezevic/ckanext-scheme-sddi@0.0.2#egg=ckanext-scheme-sddi" + pip install -e "git+https://github.com/MarijaKnezevic/ckanext-scheme-sddi@0.0.1#egg=ckanext-scheme-sddi" # ckanext-theme-sddi ############################################################# RUN set -ex && \ @@ -213,4 +190,4 @@ ONBUILD RUN mkdir -p /docker-entrypoint.d EXPOSE 5000 HEALTHCHECK --interval=60s --timeout=5s --retries=5 CMD curl --fail http://localhost:5000/api/3/action/status_show || exit CMD ["/srv/app/start_ckan.sh"] -CMD ["/srv/app/start_ckan.sh"] +CMD ["/srv/app/start_ckan.sh"] \ No newline at end of file From 87345068a07795be009dac2306f7b633019634e6 Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Tue, 18 Feb 2025 16:23:23 +0100 Subject: [PATCH 59/95] Update sddi Dockerfile --- sddi/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sddi/Dockerfile b/sddi/Dockerfile index 93df91ec..9f4bb5ab 100644 --- a/sddi/Dockerfile +++ b/sddi/Dockerfile @@ -124,7 +124,7 @@ RUN set -ex && \ # ckanext-scheme-sddi ############################################################ RUN set -ex && \ - pip install -e "git+https://github.com/MarijaKnezevic/ckanext-scheme-sddi@0.0.1#egg=ckanext-scheme-sddi" + pip install -e "git+https://github.com/MarijaKnezevic/ckanext-scheme-sddi@0.0.2#egg=ckanext-scheme-sddi" # ckanext-theme-sddi ############################################################# RUN set -ex && \ From 60519c3148e76185d36ddcf2d7e0edbf28b28e93 Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Wed, 19 Mar 2025 14:05:08 +0100 Subject: [PATCH 60/95] minor change --- CHANGELOG.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9373fd72..0e92c6f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,31 +9,36 @@ For releases `< 1.0.0` minor version steps may indicate breaking changes too. ## [3.0.0] - 2025-02-05 ### Added -- `ckanext-envvars`, `ckanext-security`, `ckanext-scheme-sddi`, `ckanext-theme-sddi`, `ckanext-heroslideradmin`. Further details can be found in the changelog file for each plugin. + +- `ckanext-envvars`, `ckanext-security`, `ckanext-scheme-sddi`, `ckanext-theme-sddi`, `ckanext-heroslideradmin`. Further details can be found in the changelog file for each plugin. ### Changed + - Migration from CKAN version 2.9.9. to CKAN 2.11.1 - A CKAN base `ckan/ckan-base:2.11.1` image is used as the build stage image - Updating the following extensions: `ckanext-hierarchy`,`ckanext-relation`, `ckanext-scheming`, `ckanext datesearch`, `ckanext-spatial`, `ckanext-geoview`, `ckanext-clamav`, `ckanext-dcat`. Further details can be found in the changelog file for each plugin. - `sddi-base` image is re-organized accordingly to [#65](https://github.com/tum-gis/ckan-docker/issues/65) ### Removed + - `sddi-social` image accordingly to [#66](https://github.com/tum-gis/ckan-docker/issues/66) - Some plugins are being dropped because they are either supported directly by CKAN or merged with other plugins: `ckanext-grouphierarchy-sddi` , `ckanext-composite`, `ckanext-repeating`, `ckanext-password-policy` ## [2.1.2] - 2024-04-17 + ### Added + - Variable that defines after how many seconds of user inactivity the user is logged out `who.timeout = 1800` ### Fixed + - Various `ckanext-grouphierarchy-sddi` updates and fixing of styling bugs. See [CHANGELOG](https://github.com/tum-gis/ckanext-grouphierarchy-sddi/releases/tag/1.1.4) for changes. - Removed "Remember me" button on the login page - Fixing the missing variables for personalization of the main page - Repair the view of the dataset added by the organization on the main page - - -## [2.1.1] - 2024-04-17 -## [2.1.0] - 2024-04-17 + ## [2.0.1] - 2023-11-07 + ### Added - Expanding the Dataset Spatial Extend preview. tum-gis/ckan-docker#52 From 43d138b2a575e55f90913175024dd38b597f3225 Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Wed, 19 Mar 2025 14:11:35 +0100 Subject: [PATCH 61/95] fix ckanext-hierarchy version --- README.md | 2 +- sddi-base/Dockerfile | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 27145805..055fcb0d 100644 --- a/README.md +++ b/README.md @@ -167,7 +167,7 @@ are alway pinned to a stable release number or commit hash. | Extension | Version | `sddi-base` |`sddi` | Description | |---|---|:---:|:---:|:---| -| [`ckanext-hierarchy`](https://github.com/ckan/ckanext-hierarchy ) | `abb4e2d` | :heavy_check_mark: | :heavy_check_mark: | Allows to organize organizations and groups in a hierarchy tree (nested groups/orgs). | +| [`ckanext-hierarchy`](https://github.com/ckan/ckanext-hierarchy ) | `v1.2.2` | :heavy_check_mark: | :heavy_check_mark: | Allows to organize organizations and groups in a hierarchy tree (nested groups/orgs). | | [`ckanext-scheming` ](https://github.com/ckan/ckanext-scheming ) | `27035f4` |:heavy_check_mark: | :heavy_check_mark: | Configure and share CKAN dataset metadata forms. | | [`ckanext-geoview` ](https://github.com/ckan/ckanext-geoview) | `v0.2.2` |:heavy_check_mark: |:heavy_check_mark: | Configure and share CKAN dataset metadata forms. | | [`ckanext-clamav` ](https://github.com/mutantsan/ckanext-clamav) | `a1d23ac` |:heavy_check_mark: | :heavy_check_mark: |CKAN extension that integrates ClamAV antivirus scanning to ensure the security of uploaded files by automatically checking them for malware.| diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index a241a026..ae5f501c 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -24,7 +24,7 @@ RUN apt-get update && apt-get install -y \ RUN pip install -U markupsafe==2.0.1 sqlalchemy==1.4.41 # ckanext-hierarchy ########################################################### -ARG CKANEXT_HIERARCHY_VERSION="abb4e2d" +ARG CKANEXT_HIERARCHY_VERSION="v1.2.2" ENV CKANEXT_HIERARCHY_VERSION=${CKANEXT_HIERARCHY_VERSION} RUN set -ex && \ @@ -161,7 +161,7 @@ RUN set -ex && \ RUN set -ex && \ pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-clamav -# ckanext-dcat ########################################################## +# ckanext-dcat ################################################################ RUN set -ex && \ pip install --find-links=${APP_DIR}/ext_wheels -r ${APP_DIR}/ext_wheels/ckanext-dcat-requirements.txt && \ pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-dcat @@ -197,4 +197,4 @@ EXPOSE 5000 HEALTHCHECK --interval=60s --timeout=5s --retries=5 CMD curl --fail http://localhost:5000/api/3/action/status_show || exit CMD ["/srv/app/start_ckan.sh"] -CMD ["/srv/app/start_ckan.sh"] \ No newline at end of file +CMD ["/srv/app/start_ckan.sh"] From e8f0779aa4570692b3b4c451de4d0f7682dd6417 Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Wed, 19 Mar 2025 14:13:27 +0100 Subject: [PATCH 62/95] fix typo --- sddi-base/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index ae5f501c..263476d3 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -47,7 +47,7 @@ RUN set -ex && \ # ckanext-scheming ############################################################ ARG CKANEXT_SCHEMING_VERSION="27035f4" ENV CKANEXT_SCHEMING_VERSION=${CKANEXT_SCHEMING_VERSION} -ENV CKANEXT_SCHEMING_GITHUB_URL="https://github.com//ckan/ckanext-scheming" +ENV CKANEXT_SCHEMING_GITHUB_URL="https://github.com/ckan/ckanext-scheming" RUN set -ex && \ pip wheel --wheel-dir=/wheels \ From 118efcd8f0217a687fc08fe6cd630ffbdd57c688 Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Wed, 19 Mar 2025 14:16:56 +0100 Subject: [PATCH 63/95] fix ckanext-clamav version --- README.md | 2 +- sddi-base/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 055fcb0d..b1c1329c 100644 --- a/README.md +++ b/README.md @@ -170,7 +170,7 @@ are alway pinned to a stable release number or commit hash. | [`ckanext-hierarchy`](https://github.com/ckan/ckanext-hierarchy ) | `v1.2.2` | :heavy_check_mark: | :heavy_check_mark: | Allows to organize organizations and groups in a hierarchy tree (nested groups/orgs). | | [`ckanext-scheming` ](https://github.com/ckan/ckanext-scheming ) | `27035f4` |:heavy_check_mark: | :heavy_check_mark: | Configure and share CKAN dataset metadata forms. | | [`ckanext-geoview` ](https://github.com/ckan/ckanext-geoview) | `v0.2.2` |:heavy_check_mark: |:heavy_check_mark: | Configure and share CKAN dataset metadata forms. | -| [`ckanext-clamav` ](https://github.com/mutantsan/ckanext-clamav) | `a1d23ac` |:heavy_check_mark: | :heavy_check_mark: |CKAN extension that integrates ClamAV antivirus scanning to ensure the security of uploaded files by automatically checking them for malware.| +| [`ckanext-clamav` ](https://github.com/mutantsan/ckanext-clamav) | `v1.1.0` |:heavy_check_mark: | :heavy_check_mark: |CKAN extension that integrates ClamAV antivirus scanning to ensure the security of uploaded files by automatically checking them for malware.| | [`ckanext-dcat` ](https://github.com/ckan/ckanext-dcat ) | `v1.5.1` |:heavy_check_mark: | :heavy_check_mark: |Allow CKAN to expose and consume metadata from other catalogs using RDF documents serialized using DCAT.| | [`ckanext-relation-sddi`](https://github.com/tum-gis/ckanext-relation-sddi ) | `1.1.0` | | :heavy_check_mark: | Enables to create and visualize different types of relations (*realated_to*, *depends_on*, *part_of*) between catalog entries. | | [`ckanext-datesearch`](https://github.com/MarijaKnezevic/ckanext-datesearch) | `1.1.0`|| :heavy_check_mark: | Provides the ability to search for datasets according to a given time frame. The search includes all datasets, in which the time of validity overlaps in at least one second with the search time frame. | diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index 263476d3..cc735314 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -66,7 +66,7 @@ RUN set -ex && \ git+${CKANEXT_GEOVIEW_GITHUB_URL}.git@${CKANEXT_GEOVIEW_VERSION}#egg=ckanext-geoview # ckanext-clamav ############################################################ -ARG CKANEXT_CLAMAV_VERSION="a1d23ac" +ARG CKANEXT_CLAMAV_VERSION="v1.1.0" ENV CKANEXT_CLAMAV_VERSION=${CKANEXT_CLAMAV_VERSION} ENV CKANEXT_CLAMAV_GITHUB_URL="https://github.com/DataShades/ckanext-clamav" From dd267e208a8908c77f355898833d731947c9242f Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Wed, 19 Mar 2025 14:29:54 +0100 Subject: [PATCH 64/95] ckanext-spatial version --- README.md | 2 +- sddi/Dockerfile | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b1c1329c..b2474acb 100644 --- a/README.md +++ b/README.md @@ -174,7 +174,7 @@ are alway pinned to a stable release number or commit hash. | [`ckanext-dcat` ](https://github.com/ckan/ckanext-dcat ) | `v1.5.1` |:heavy_check_mark: | :heavy_check_mark: |Allow CKAN to expose and consume metadata from other catalogs using RDF documents serialized using DCAT.| | [`ckanext-relation-sddi`](https://github.com/tum-gis/ckanext-relation-sddi ) | `1.1.0` | | :heavy_check_mark: | Enables to create and visualize different types of relations (*realated_to*, *depends_on*, *part_of*) between catalog entries. | | [`ckanext-datesearch`](https://github.com/MarijaKnezevic/ckanext-datesearch) | `1.1.0`|| :heavy_check_mark: | Provides the ability to search for datasets according to a given time frame. The search includes all datasets, in which the time of validity overlaps in at least one second with the search time frame. | -| [`ckanext-spatial`](https://github.com/ckan/ckanext-spatial) | `v2.2.0` | |:heavy_check_mark: | Enables geospatial capabilities to CKAN instance. | +| [`ckanext-spatial`](https://github.com/ckan/ckanext-spatial) | `v2.3.0` | |:heavy_check_mark: | Enables geospatial capabilities to CKAN instance. | | [`ckanext-scheme-sddi`](https://github.com/MarijaKnezevic/ckanext-scheme-sddi) | `0.0.1` || :heavy_check_mark: | This plugin is extending CKAN schema definition, validation, and custom field support accordingly to SDDI needs. | | [`ckanext-theme-sddi`](https://github.com/MarijaKnezevic/ckanext-theme-sddi) | `0.0.4` | |:heavy_check_mark: | This plugin is customizing the look of SDDI CKAN instance with theme management capabilities for improved branding and user needs.| | [`ckanext-security` ](https://github.com/MarijaKnezevic/ckanext-security) | `0.0.1` || :heavy_check_mark: | CKAN extension that enhances data access control. In the SDDI context, context is used to define the maximum number of failed logon attempts and to automatically log off after a period of inactivity.| diff --git a/sddi/Dockerfile b/sddi/Dockerfile index 9f4bb5ab..86b1997f 100644 --- a/sddi/Dockerfile +++ b/sddi/Dockerfile @@ -49,7 +49,7 @@ RUN set -ex && \ # ckanext-spatial ############################################################# ENV CKANEXT_SPATIAL_GITHUB_URL="https://github.com/ckan/ckanext-spatial" -ENV CKANEXT_SPATIAL_VERSION="v2.2.0" +ENV CKANEXT_SPATIAL_VERSION="v2.3.0" RUN set -ex && \ curl -o /wheels/ckanext-spatial-requirements.txt \ @@ -73,7 +73,7 @@ RUN set -ex && \ ARG CKANEXT_SECURITY_VERSION="0.0.1" ENV CKANEXT_SECURITY_VERSION=${CKANEXT_SECURITY_VERSION} ENV CKANEXT_SECURITY_GITHUB_URL="https://github.com/MarijaKnezevic/ckanext-security" - + RUN set -ex && \ curl -o /wheels/ckanext-security-requirements.txt \ https://raw.githubusercontent.com/MarijaKnezevic/ckanext-security/${CKANEXT_SECURITY_VERSION}/requirements.txt && \ @@ -190,4 +190,4 @@ ONBUILD RUN mkdir -p /docker-entrypoint.d EXPOSE 5000 HEALTHCHECK --interval=60s --timeout=5s --retries=5 CMD curl --fail http://localhost:5000/api/3/action/status_show || exit CMD ["/srv/app/start_ckan.sh"] -CMD ["/srv/app/start_ckan.sh"] \ No newline at end of file +CMD ["/srv/app/start_ckan.sh"] From bd6242409190db75f4a25177cc74dae09f57f668 Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Wed, 19 Mar 2025 14:34:55 +0100 Subject: [PATCH 65/95] fixed typo --- sddi/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sddi/Dockerfile b/sddi/Dockerfile index 86b1997f..bc57f72b 100644 --- a/sddi/Dockerfile +++ b/sddi/Dockerfile @@ -175,7 +175,7 @@ RUN set -ex && \ ckan config-tool "${CKAN_INI}" "ckanext.security.brute_force_key = user_name" && \ ckan config-tool "${CKAN_INI}" "ckanext.security.disable_password_reset_override = true" && \ ckan config-tool "${CKAN_INI}" "ckanext.security.enable_totp = true" && \ - ckan config-tool "${CKAN_INI}" "ckanext.dcat.enable_content_negotiation = True" && \ + ckan config-tool "${CKAN_INI}" "ckanext.dcat.enable_content_negotiation = true" && \ ckan config-tool "${CKAN_INI}" "PERMANENT_SESSION_LIFETIME = 600" # Remove wheels From 02ba264784581dba4f290cf8933b6587dd45bcc8 Mon Sep 17 00:00:00 2001 From: Ilche Bedelovski Date: Wed, 19 Mar 2025 19:22:18 +0100 Subject: [PATCH 66/95] Configuration ini file path removed --- sddi-base/Dockerfile | 5 ++--- sddi/Dockerfile | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index cc735314..c2eb074e 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -21,7 +21,7 @@ RUN apt-get update && apt-get install -y \ libxml2-dev \ libxslt-dev -RUN pip install -U markupsafe==2.0.1 sqlalchemy==1.4.41 +# RUN pip install -U markupsafe==2.0.1 sqlalchemy==1.4.41 # ckanext-hierarchy ########################################################### ARG CKANEXT_HIERARCHY_VERSION="v1.2.2" @@ -96,7 +96,6 @@ FROM ckan/ckan-base:${CKAN_VERSION_BUILD_STAGE} as runtime ENV CKAN_DIR=${SRC_DIR}/ckan ENV DATA_DIR=/srv/app/data -ENV CKAN_INI=${APP_DIR}/production.ini ENV UWSGI_HARAKIRI=50 USER root @@ -176,7 +175,7 @@ ENV CKAN__PLUGINS "envvars image_view text_view webpage_view datastore \ clamav" RUN set -ex && \ - ckan generate config ${APP_DIR}/production.ini + ckan generate config ${CKAN_INI} RUN set -ex && \ ckan config-tool "${CKAN_INI}" "ckan.plugins = ${CKAN__PLUGINS}" && \ diff --git a/sddi/Dockerfile b/sddi/Dockerfile index bc57f72b..448f6a23 100644 --- a/sddi/Dockerfile +++ b/sddi/Dockerfile @@ -88,7 +88,6 @@ FROM ${BASEIMAGE_REPOSITORY}:${BASEIMAGE_VERSION} ENV CKAN_DIR=${SRC_DIR}/ckan ENV DATA_DIR=/srv/app/data -ENV CKAN_INI=${APP_DIR}/production.ini ENV UWSGI_HARAKIRI=50 USER root @@ -156,7 +155,7 @@ ENV CKAN__PLUGINS "envvars image_view text_view webpage_view datastore \ clamav" RUN set -ex && \ - ckan generate config ${APP_DIR}/production.ini + ckan generate config ${CKAN_INI} RUN set -ex && \ ckan config-tool "${CKAN_INI}" "ckan.plugins = ${CKAN__PLUGINS}" && \ From 456f06c2b3684b8d1dfaf2f3339f0af07bf4f30c Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Thu, 20 Mar 2025 15:45:54 +0100 Subject: [PATCH 67/95] Remove commented pip install line --- sddi-base/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index c2eb074e..6d65f1ba 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -21,7 +21,7 @@ RUN apt-get update && apt-get install -y \ libxml2-dev \ libxslt-dev -# RUN pip install -U markupsafe==2.0.1 sqlalchemy==1.4.41 +RUN pip install -U markupsafe==2.0.1 sqlalchemy==1.4.41 # ckanext-hierarchy ########################################################### ARG CKANEXT_HIERARCHY_VERSION="v1.2.2" From c24c59ab6db26c60a00a9eabef05da0b636d8e98 Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Thu, 20 Mar 2025 16:05:25 +0100 Subject: [PATCH 68/95] Revert changes to configuration ini file path --- sddi-base/Dockerfile | 5 +++-- sddi/Dockerfile | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index 6d65f1ba..0ca5e25c 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -21,7 +21,7 @@ RUN apt-get update && apt-get install -y \ libxml2-dev \ libxslt-dev -RUN pip install -U markupsafe==2.0.1 sqlalchemy==1.4.41 +# RUN pip install -U markupsafe==2.0.1 sqlalchemy==1.4.41 # ckanext-hierarchy ########################################################### ARG CKANEXT_HIERARCHY_VERSION="v1.2.2" @@ -96,6 +96,7 @@ FROM ckan/ckan-base:${CKAN_VERSION_BUILD_STAGE} as runtime ENV CKAN_DIR=${SRC_DIR}/ckan ENV DATA_DIR=/srv/app/data +ENV CKAN_INI=${APP_DIR}/production.ini ENV UWSGI_HARAKIRI=50 USER root @@ -175,7 +176,7 @@ ENV CKAN__PLUGINS "envvars image_view text_view webpage_view datastore \ clamav" RUN set -ex && \ - ckan generate config ${CKAN_INI} + ckan generate config ${APP_DIR}/production.ini RUN set -ex && \ ckan config-tool "${CKAN_INI}" "ckan.plugins = ${CKAN__PLUGINS}" && \ diff --git a/sddi/Dockerfile b/sddi/Dockerfile index 448f6a23..bc57f72b 100644 --- a/sddi/Dockerfile +++ b/sddi/Dockerfile @@ -88,6 +88,7 @@ FROM ${BASEIMAGE_REPOSITORY}:${BASEIMAGE_VERSION} ENV CKAN_DIR=${SRC_DIR}/ckan ENV DATA_DIR=/srv/app/data +ENV CKAN_INI=${APP_DIR}/production.ini ENV UWSGI_HARAKIRI=50 USER root @@ -155,7 +156,7 @@ ENV CKAN__PLUGINS "envvars image_view text_view webpage_view datastore \ clamav" RUN set -ex && \ - ckan generate config ${CKAN_INI} + ckan generate config ${APP_DIR}/production.ini RUN set -ex && \ ckan config-tool "${CKAN_INI}" "ckan.plugins = ${CKAN__PLUGINS}" && \ From 54d995985ff4ae03380a8f78868b541a7d97b21f Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Thu, 20 Mar 2025 16:47:00 +0100 Subject: [PATCH 69/95] Revert changes to configuration ini file path --- sddi-base/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index 0ca5e25c..cc735314 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -21,7 +21,7 @@ RUN apt-get update && apt-get install -y \ libxml2-dev \ libxslt-dev -# RUN pip install -U markupsafe==2.0.1 sqlalchemy==1.4.41 +RUN pip install -U markupsafe==2.0.1 sqlalchemy==1.4.41 # ckanext-hierarchy ########################################################### ARG CKANEXT_HIERARCHY_VERSION="v1.2.2" From d600e27150c20d727e49f350d3f056b612923c9c Mon Sep 17 00:00:00 2001 From: Marija <93824048+MarijaKnezevic@users.noreply.github.com> Date: Thu, 20 Mar 2025 17:02:29 +0100 Subject: [PATCH 70/95] ckanext-clamav version --- sddi-base/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index cc735314..263476d3 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -66,7 +66,7 @@ RUN set -ex && \ git+${CKANEXT_GEOVIEW_GITHUB_URL}.git@${CKANEXT_GEOVIEW_VERSION}#egg=ckanext-geoview # ckanext-clamav ############################################################ -ARG CKANEXT_CLAMAV_VERSION="v1.1.0" +ARG CKANEXT_CLAMAV_VERSION="a1d23ac" ENV CKANEXT_CLAMAV_VERSION=${CKANEXT_CLAMAV_VERSION} ENV CKANEXT_CLAMAV_GITHUB_URL="https://github.com/DataShades/ckanext-clamav" From 47fd18c577e0a266f103ee6cfd094d94680e52f0 Mon Sep 17 00:00:00 2001 From: Marija <93824048+MarijaKnezevic@users.noreply.github.com> Date: Thu, 20 Mar 2025 17:03:05 +0100 Subject: [PATCH 71/95] ckanext-clamav version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b2474acb..df56d6e4 100644 --- a/README.md +++ b/README.md @@ -170,7 +170,7 @@ are alway pinned to a stable release number or commit hash. | [`ckanext-hierarchy`](https://github.com/ckan/ckanext-hierarchy ) | `v1.2.2` | :heavy_check_mark: | :heavy_check_mark: | Allows to organize organizations and groups in a hierarchy tree (nested groups/orgs). | | [`ckanext-scheming` ](https://github.com/ckan/ckanext-scheming ) | `27035f4` |:heavy_check_mark: | :heavy_check_mark: | Configure and share CKAN dataset metadata forms. | | [`ckanext-geoview` ](https://github.com/ckan/ckanext-geoview) | `v0.2.2` |:heavy_check_mark: |:heavy_check_mark: | Configure and share CKAN dataset metadata forms. | -| [`ckanext-clamav` ](https://github.com/mutantsan/ckanext-clamav) | `v1.1.0` |:heavy_check_mark: | :heavy_check_mark: |CKAN extension that integrates ClamAV antivirus scanning to ensure the security of uploaded files by automatically checking them for malware.| +| [`ckanext-clamav` ](https://github.com/mutantsan/ckanext-clamav) | `a1d23ac` |:heavy_check_mark: | :heavy_check_mark: |CKAN extension that integrates ClamAV antivirus scanning to ensure the security of uploaded files by automatically checking them for malware.| | [`ckanext-dcat` ](https://github.com/ckan/ckanext-dcat ) | `v1.5.1` |:heavy_check_mark: | :heavy_check_mark: |Allow CKAN to expose and consume metadata from other catalogs using RDF documents serialized using DCAT.| | [`ckanext-relation-sddi`](https://github.com/tum-gis/ckanext-relation-sddi ) | `1.1.0` | | :heavy_check_mark: | Enables to create and visualize different types of relations (*realated_to*, *depends_on*, *part_of*) between catalog entries. | | [`ckanext-datesearch`](https://github.com/MarijaKnezevic/ckanext-datesearch) | `1.1.0`|| :heavy_check_mark: | Provides the ability to search for datasets according to a given time frame. The search includes all datasets, in which the time of validity overlaps in at least one second with the search time frame. | From f950c57e46903af66223ed82d71331d40b2d7cd7 Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Thu, 20 Mar 2025 18:33:53 +0100 Subject: [PATCH 72/95] Revert changes to configuration ini file path --- sddi-base/Dockerfile | 5 ++--- sddi/Dockerfile | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index 263476d3..ac3e2f7f 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -21,7 +21,7 @@ RUN apt-get update && apt-get install -y \ libxml2-dev \ libxslt-dev -RUN pip install -U markupsafe==2.0.1 sqlalchemy==1.4.41 +# RUN pip install -U markupsafe==2.0.1 sqlalchemy==1.4.41 # ckanext-hierarchy ########################################################### ARG CKANEXT_HIERARCHY_VERSION="v1.2.2" @@ -96,7 +96,6 @@ FROM ckan/ckan-base:${CKAN_VERSION_BUILD_STAGE} as runtime ENV CKAN_DIR=${SRC_DIR}/ckan ENV DATA_DIR=/srv/app/data -ENV CKAN_INI=${APP_DIR}/production.ini ENV UWSGI_HARAKIRI=50 USER root @@ -176,7 +175,7 @@ ENV CKAN__PLUGINS "envvars image_view text_view webpage_view datastore \ clamav" RUN set -ex && \ - ckan generate config ${APP_DIR}/production.ini + ckan generate config ${CKAN_INI} RUN set -ex && \ ckan config-tool "${CKAN_INI}" "ckan.plugins = ${CKAN__PLUGINS}" && \ diff --git a/sddi/Dockerfile b/sddi/Dockerfile index bc57f72b..448f6a23 100644 --- a/sddi/Dockerfile +++ b/sddi/Dockerfile @@ -88,7 +88,6 @@ FROM ${BASEIMAGE_REPOSITORY}:${BASEIMAGE_VERSION} ENV CKAN_DIR=${SRC_DIR}/ckan ENV DATA_DIR=/srv/app/data -ENV CKAN_INI=${APP_DIR}/production.ini ENV UWSGI_HARAKIRI=50 USER root @@ -156,7 +155,7 @@ ENV CKAN__PLUGINS "envvars image_view text_view webpage_view datastore \ clamav" RUN set -ex && \ - ckan generate config ${APP_DIR}/production.ini + ckan generate config ${CKAN_INI} RUN set -ex && \ ckan config-tool "${CKAN_INI}" "ckan.plugins = ${CKAN__PLUGINS}" && \ From f01bfdb91142f9c244e973f2589565bf861ea7b6 Mon Sep 17 00:00:00 2001 From: Aleksandra Lazoroska Date: Fri, 21 Mar 2025 15:44:57 +0100 Subject: [PATCH 73/95] Remove pip install for markupsafe and sqlalchemy --- sddi-base/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index ac3e2f7f..5c980a31 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -21,8 +21,6 @@ RUN apt-get update && apt-get install -y \ libxml2-dev \ libxslt-dev -# RUN pip install -U markupsafe==2.0.1 sqlalchemy==1.4.41 - # ckanext-hierarchy ########################################################### ARG CKANEXT_HIERARCHY_VERSION="v1.2.2" ENV CKANEXT_HIERARCHY_VERSION=${CKANEXT_HIERARCHY_VERSION} From 9d377bc9f8f1404420f88f547616bcdbf15c0332 Mon Sep 17 00:00:00 2001 From: Marija <93824048+MarijaKnezevic@users.noreply.github.com> Date: Fri, 21 Mar 2025 16:50:23 +0100 Subject: [PATCH 74/95] Update README.md --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index df56d6e4..6e40d961 100644 --- a/README.md +++ b/README.md @@ -141,10 +141,6 @@ For instance, for commit 19a2e64 to PR tum-gis/ckan-docker#26 following images a - `ghcr.io/tum-gis/ckan-sddi-dev:sddi-pr-26-debug` - `ghcr.io/tum-gis/ckan-sddi-dev:sddi-pr-26-19a2e64` - `ghcr.io/tum-gis/ckan-sddi-dev:sddi-pr-26-19a2e64-debug` -- `ghcr.io/tum-gis/ckan-sddi-dev:sddi-social-pr-26` -- `ghcr.io/tum-gis/ckan-sddi-dev:sddi-social-pr-26-debug` -- `ghcr.io/tum-gis/ckan-sddi-dev:sddi-social-pr-26-19a2e64` -- `ghcr.io/tum-gis/ckan-sddi-dev:sddi-social-pr-26-19a2e64-debug` This registry will be cleared periodically. From de5a41bfb6862cfc502e0fe3b65eb88109d94be2 Mon Sep 17 00:00:00 2001 From: Marija <93824048+MarijaKnezevic@users.noreply.github.com> Date: Fri, 21 Mar 2025 16:50:59 +0100 Subject: [PATCH 75/95] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e92c6f4..703b652a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). For releases `< 1.0.0` minor version steps may indicate breaking changes too. -## [3.0.0] - 2025-02-05 +## [3.0.0] - 2025-03-21 ### Added From 84abc080e930446f4f4fd55eaa01e5d3636c4f19 Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Wed, 2 Apr 2025 12:00:28 +0200 Subject: [PATCH 76/95] update workflow actions --- .github/workflows/pull-request.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 82f034a4..c4d276f6 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -20,14 +20,14 @@ jobs: steps: - name: Parse short sha - uses: benjlevesque/short-sha@v1.2 + uses: benjlevesque/short-sha@v3.0 id: short-sha - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Log in to the Github Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -37,7 +37,7 @@ jobs: - name: Extract metadata (tags, labels) for docker image id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | ${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev @@ -52,7 +52,7 @@ jobs: org.opencontainers.image.title=ckan-sddi-base-docker-dev - name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-base-pr-${{github.event.number}} - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: push: true context: sddi-base @@ -66,7 +66,7 @@ jobs: - name: Extract metadata (tags, labels) for docker image id: meta-debug - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | ${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev @@ -81,7 +81,7 @@ jobs: org.opencontainers.image.title=ckan-sddi-base-docker-dev-debug - name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-base-pr-${{github.event.number}}-debug - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: push: true context: sddi-base @@ -101,7 +101,7 @@ jobs: - name: Extract metadata (tags, labels) for docker image id: meta-sddi - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | ${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev @@ -114,7 +114,7 @@ jobs: org.opencontainers.image.title=ckan-sddi-docker-dev - name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-pr-${{github.event.number}} - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: push: true context: sddi @@ -131,7 +131,7 @@ jobs: - name: Extract metadata (tags, labels) for docker image id: meta-sddi-debug - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | ${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev @@ -144,7 +144,7 @@ jobs: org.opencontainers.image.title=ckan-sddi-docker-dev-debug - name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-pr-${{github.event.number}}-debug - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: push: true context: sddi From 965e611198b36beb69b19c2e444475b9f68fa96e Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Wed, 2 Apr 2025 12:00:44 +0200 Subject: [PATCH 77/95] fix wrong base image for sddi-debug --- .github/workflows/pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index c4d276f6..dd8394fc 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -153,7 +153,7 @@ jobs: labels: ${{ steps.meta-sddi-debug.outputs.labels }} build-args: | BASEIMAGE_REPOSITORY=${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev - BASEIMAGE_VERSION=sddi-base-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }} + BASEIMAGE_VERSION=sddi-pr-${{github.event.number}}-${{ steps.short-sha.outputs.sha }} - name: Print image names run: | From f6864794f3b8236c3b26cded110863911d6bcce2 Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Thu, 3 Apr 2025 10:13:24 +0200 Subject: [PATCH 78/95] allow trigger workflows from Github.com --- .github/workflows/pull-request.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index dd8394fc..3e3a5874 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -5,6 +5,7 @@ on: paths: - sddi-base/** - sddi/** + workflow_dispatch: env: REGISTRY: ghcr.io From fe77f05408f91754ab1de32c6ef7aecdd36b5562 Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Thu, 3 Apr 2025 10:13:24 +0200 Subject: [PATCH 79/95] allow trigger workflow from Github.com --- .github/workflows/devel.yml | 1 + .github/workflows/edge.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/devel.yml b/.github/workflows/devel.yml index 85b0973d..47d6b8b0 100644 --- a/.github/workflows/devel.yml +++ b/.github/workflows/devel.yml @@ -6,6 +6,7 @@ on: paths: - sddi-base/** - sddi/** + workflow_dispatch: env: REGISTRY: ghcr.io diff --git a/.github/workflows/edge.yml b/.github/workflows/edge.yml index 532c5f94..c66440c9 100644 --- a/.github/workflows/edge.yml +++ b/.github/workflows/edge.yml @@ -6,6 +6,7 @@ on: paths: - sddi-base/** - sddi/** + workflow_dispatch: env: REGISTRY: ghcr.io From 07952ec427e257eb7c1126d8a15c3f5653e00755 Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Thu, 3 Apr 2025 10:13:24 +0200 Subject: [PATCH 80/95] update cleanup workflow --- .github/workflows/cleanup-dev-images.yml | 81 +++++++++--------------- 1 file changed, 31 insertions(+), 50 deletions(-) diff --git a/.github/workflows/cleanup-dev-images.yml b/.github/workflows/cleanup-dev-images.yml index 59c4fb6a..0a34a743 100644 --- a/.github/workflows/cleanup-dev-images.yml +++ b/.github/workflows/cleanup-dev-images.yml @@ -1,58 +1,39 @@ -name: Cleanup dev images of merged PRs - +name: Cleanup Pull Request Images on: - schedule: - - cron: "0 2 * * *" # Runs daily at 2 AM UTC - workflow_dispatch: # Allows manual triggering + pull_request: + types: [closed] + workflow_dispatch: + inputs: + pr-number: + description: 'Pull Request Number' + required: true + default: '0' env: - IMAGE_NAME: ckan-sddi-dev - IMAGE_OWNER: ${{ github.repository_owner }} + PACKAGE_NAME: ckan-sddi-dev + PACKAGE_REPO: ${{ github.repository_owner }} jobs: - cleanup-ghcr: + ghcr-cleanup-image: + if: github.event_name == 'pull_request' + name: ghcr cleanup action runs-on: ubuntu-latest steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Get Image Tags from GHCR - run: | - GHCR_API="https://ghcr.io/v2/$IMAGE_OWNER/$IMAGE_NAME/tags/list" - TAGS=$(curl -s -H "Authorization: Bearer $(echo ${{ secrets.GITHUB_TOKEN }} | base64)" "$GHCR_API" | jq -r '.tags[]') - echo "$TAGS" > tags_list.txt - - - name: Identify Merged PRs - run: | - MAPPED_TAGS=() - while read -r TAG; do - if [[ $TAG =~ ^[a-zA-Z0-9]+-pr-(\d+)(?:-[a-f0-9]+)?$ ]]; then - PR_NUMBER=${BASH_REMATCH[1]} - RESPONSE=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ - "https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER") - MERGED=$(echo "$RESPONSE" | jq -r '.merged') - if [[ "$MERGED" == "true" ]]; then - MAPPED_TAGS+=("$TAG") - fi - fi - done < tags_list.txt - printf "%s\n" "${MAPPED_TAGS[@]}" > delete_tags.txt - echo "Images to be deleted:" && cat delete_tags.txt + - name: Delete image + uses: dataaxiom/ghcr-cleanup-action@v1 + with: + delete-tags: "*pr-${{github.event.pull_request.number}}*" + repository: ${{ env.PACKAGE_NAME }} + package: ${{ env.PACKAGE_REPO }} - - name: Delete Merged PR Images - if: ${{ always() }} - run: | - if [ -s delete_tags.txt ]; then - echo "Deleting the following images:" && cat delete_tags.txt - while read -r TAG; do - DIGEST=$(curl -s -H "Authorization: Bearer $(echo ${{ secrets.GITHUB_TOKEN }} | base64)" \ - -H "Accept: application/vnd.oci.image.manifest.v1+json" \ - "https://ghcr.io/v2/$IMAGE_OWNER/$IMAGE_NAME/manifests/$TAG" | jq -r '.config.digest') - if [ "$DIGEST" != "null" ]; then - GHCR_DELETE_URL="https://ghcr.io/v2/$IMAGE_OWNER/$IMAGE_NAME/manifests/$DIGEST" - curl -X DELETE -H "Authorization: Bearer $(echo ${{ secrets.GITHUB_TOKEN }} | base64)" "$GHCR_DELETE_URL" - fi - done < delete_tags.txt - else - echo "No images to delete." - fi + ghcr-cleanup-image-manual: + if: github.event_name == 'workflow_dispatch' + name: ghcr cleanup action + runs-on: ubuntu-latest + steps: + - name: Delete image + uses: dataaxiom/ghcr-cleanup-action@v1 + with: + delete-tags: "*pr-${{ inputs.pr-number }}*" + repository: ${{ env.PACKAGE_NAME }} + package: ${{ env.PACKAGE_REPO }} From 673b4d39d18c1909483d7b41e16f24a6ddafb06f Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Thu, 3 Apr 2025 10:13:24 +0200 Subject: [PATCH 81/95] remove surplus setting for repo --- .github/workflows/cleanup-dev-images.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/cleanup-dev-images.yml b/.github/workflows/cleanup-dev-images.yml index 0a34a743..e80587d0 100644 --- a/.github/workflows/cleanup-dev-images.yml +++ b/.github/workflows/cleanup-dev-images.yml @@ -23,7 +23,6 @@ jobs: uses: dataaxiom/ghcr-cleanup-action@v1 with: delete-tags: "*pr-${{github.event.pull_request.number}}*" - repository: ${{ env.PACKAGE_NAME }} package: ${{ env.PACKAGE_REPO }} ghcr-cleanup-image-manual: @@ -35,5 +34,4 @@ jobs: uses: dataaxiom/ghcr-cleanup-action@v1 with: delete-tags: "*pr-${{ inputs.pr-number }}*" - repository: ${{ env.PACKAGE_NAME }} package: ${{ env.PACKAGE_REPO }} From 03db597d55d480bde8acbcb1599001bf3016e162 Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Thu, 3 Apr 2025 10:13:24 +0200 Subject: [PATCH 82/95] fix package name --- .github/workflows/cleanup-dev-images.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cleanup-dev-images.yml b/.github/workflows/cleanup-dev-images.yml index e80587d0..71a0a7b2 100644 --- a/.github/workflows/cleanup-dev-images.yml +++ b/.github/workflows/cleanup-dev-images.yml @@ -11,7 +11,6 @@ on: env: PACKAGE_NAME: ckan-sddi-dev - PACKAGE_REPO: ${{ github.repository_owner }} jobs: ghcr-cleanup-image: @@ -23,7 +22,7 @@ jobs: uses: dataaxiom/ghcr-cleanup-action@v1 with: delete-tags: "*pr-${{github.event.pull_request.number}}*" - package: ${{ env.PACKAGE_REPO }} + package: ${{ env.PACKAGE_NAME }} ghcr-cleanup-image-manual: if: github.event_name == 'workflow_dispatch' @@ -34,4 +33,4 @@ jobs: uses: dataaxiom/ghcr-cleanup-action@v1 with: delete-tags: "*pr-${{ inputs.pr-number }}*" - package: ${{ env.PACKAGE_REPO }} + package: ${{ env.PACKAGE_NAME }} From 0a7be54671f91e83651cdf0bff938c2ecc5b8c13 Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Thu, 3 Apr 2025 10:13:24 +0200 Subject: [PATCH 83/95] Allow manual dispatch with PR number --- .github/workflows/pull-request.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 3e3a5874..951d1776 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -6,6 +6,11 @@ on: - sddi-base/** - sddi/** workflow_dispatch: + inputs: + pr-number: + description: 'Pull Request Number' + required: true + default: '0' env: REGISTRY: ghcr.io From b4b16ba494a15f037c5451bab3f9c7bd278d64f8 Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Thu, 3 Apr 2025 10:45:20 +0200 Subject: [PATCH 84/95] Update workflow actions --- .github/workflows/devel.yml | 12 ++++++------ .github/workflows/edge.yml | 12 ++++++------ .github/workflows/release.yml | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/devel.yml b/.github/workflows/devel.yml index 47d6b8b0..bce2ca91 100644 --- a/.github/workflows/devel.yml +++ b/.github/workflows/devel.yml @@ -26,10 +26,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Log in to the Github Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -37,7 +37,7 @@ jobs: - name: Extract metadata (tags, labels) for devel docker image id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | ${{ env.REGISTRY }}/tum-gis/ckan-${{ matrix.context }} @@ -49,7 +49,7 @@ jobs: org.opencontainers.image.title=ckan-sddi-docker - name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-${{ matrix.context }}:devel - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: ${{ matrix.context }} push: true @@ -60,7 +60,7 @@ jobs: - name: Extract metadata (tags, labels) for devel-debug docker image id: meta-debug - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | ${{ env.REGISTRY }}/tum-gis/ckan-${{ matrix.context }} @@ -72,7 +72,7 @@ jobs: org.opencontainers.image.title=ckan-sddi-docker - name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-${{ matrix.context }}:devel-debug - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: ${{ matrix.context }} file: ${{ matrix.context }}/Dockerfile.debug diff --git a/.github/workflows/edge.yml b/.github/workflows/edge.yml index c66440c9..f91cd8c2 100644 --- a/.github/workflows/edge.yml +++ b/.github/workflows/edge.yml @@ -26,10 +26,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Log in to the Github Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -37,7 +37,7 @@ jobs: - name: Extract metadata (tags, labels) for docker image id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | ${{ env.REGISTRY }}/tum-gis/ckan-${{ matrix.context }} @@ -49,7 +49,7 @@ jobs: org.opencontainers.image.title=ckan-sddi-docker - name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-${{ matrix.context }} - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: ${{ matrix.context }} push: true @@ -60,7 +60,7 @@ jobs: - name: Extract metadata (tags, labels) for debug docker image id: meta-debug - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | ${{ env.REGISTRY }}/tum-gis/ckan-${{ matrix.context }} @@ -72,7 +72,7 @@ jobs: org.opencontainers.image.title=ckan-sddi-docker - name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-${{ matrix.context }} - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: ${{ matrix.context }} file: ${{ matrix.context }}/Dockerfile.debug diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 249013c8..4d0f3e8b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,10 +22,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Log in to the Github Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -33,7 +33,7 @@ jobs: - name: Extract metadata (tags, labels) for docker image id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | ${{ env.REGISTRY }}/tum-gis/ckan-${{ matrix.context }} @@ -46,7 +46,7 @@ jobs: org.opencontainers.image.title=ckan-sddi-docker - name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-${{ matrix.context }} - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: ${{ matrix.context }} push: true @@ -57,7 +57,7 @@ jobs: - name: Extract metadata (tags, labels) for debug docker image id: meta-debug - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: flavor: latest=true,suffix=-debug,onlatest=true @@ -72,7 +72,7 @@ jobs: org.opencontainers.image.title=ckan-sddi-docker - name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-${{ matrix.context }}-debug - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: ${{ matrix.context }} file: ${{ matrix.context }}/Dockerfile.debug From f542ecf4709336c7b668d76a2f12e73088fcd212 Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Thu, 3 Apr 2025 11:06:04 +0200 Subject: [PATCH 85/95] build major version image only too --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4d0f3e8b..645cc5b8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,6 +40,7 @@ jobs: tags: | type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} labels: | maintainer=Chair of Geoinformatics, Technical University of Munich (TUM) org.opencontainers.image.vendor=Chair of Geoinformatics, Technical University of Munich (TUM) @@ -66,6 +67,7 @@ jobs: tags: | type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} labels: | maintainer=Chair of Geoinformatics, Technical University of Munich (TUM) org.opencontainers.image.vendor=Chair of Geoinformatics, Technical University of Munich (TUM) From c1287f3b62d95261c650cb21860a6614439514df Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Thu, 3 Apr 2025 11:24:28 +0200 Subject: [PATCH 86/95] update labels --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 645cc5b8..56c7319c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,6 +45,7 @@ jobs: maintainer=Chair of Geoinformatics, Technical University of Munich (TUM) org.opencontainers.image.vendor=Chair of Geoinformatics, Technical University of Munich (TUM) org.opencontainers.image.title=ckan-sddi-docker + org.opencontainers.image.documentation=https://github.com/tum-gis/ckan-docker - name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-${{ matrix.context }} uses: docker/build-push-action@v6 @@ -72,6 +73,7 @@ jobs: maintainer=Chair of Geoinformatics, Technical University of Munich (TUM) org.opencontainers.image.vendor=Chair of Geoinformatics, Technical University of Munich (TUM) org.opencontainers.image.title=ckan-sddi-docker + org.opencontainers.image.documentation=https://github.com/tum-gis/ckan-docker - name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-${{ matrix.context }}-debug uses: docker/build-push-action@v6 From e49f4c97f889e7d902090d45f0381f59741f33ef Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Thu, 3 Apr 2025 11:35:29 +0200 Subject: [PATCH 87/95] update labels --- .github/workflows/devel.yml | 5 +++-- .github/workflows/edge.yml | 6 ++++-- .github/workflows/pull-request.yml | 4 ++++ .github/workflows/release.yml | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/devel.yml b/.github/workflows/devel.yml index bce2ca91..388b7dc4 100644 --- a/.github/workflows/devel.yml +++ b/.github/workflows/devel.yml @@ -46,7 +46,8 @@ jobs: labels: | maintainer=Chair of Geoinformatics, Technical University of Munich (TUM) org.opencontainers.image.vendor=Chair of Geoinformatics, Technical University of Munich (TUM) - org.opencontainers.image.title=ckan-sddi-docker + org.opencontainers.image.title=ckan-sddi-base-docker-devel + org.opencontainers.image.documentation=https://github.com/tum-gis/ckan-docker - name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-${{ matrix.context }}:devel uses: docker/build-push-action@v6 @@ -69,7 +70,7 @@ jobs: labels: | maintainer=Chair of Geoinformatics, Technical University of Munich (TUM) org.opencontainers.image.vendor=Chair of Geoinformatics, Technical University of Munich (TUM) - org.opencontainers.image.title=ckan-sddi-docker + org.opencontainers.image.title=ckan-sddi-base-docker-devel-debug - name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-${{ matrix.context }}:devel-debug uses: docker/build-push-action@v6 diff --git a/.github/workflows/edge.yml b/.github/workflows/edge.yml index f91cd8c2..97cee2cd 100644 --- a/.github/workflows/edge.yml +++ b/.github/workflows/edge.yml @@ -46,7 +46,8 @@ jobs: labels: | maintainer=Chair of Geoinformatics, Technical University of Munich (TUM) org.opencontainers.image.vendor=Chair of Geoinformatics, Technical University of Munich (TUM) - org.opencontainers.image.title=ckan-sddi-docker + org.opencontainers.image.title=ckan-sddi-base-docker-edge + org.opencontainers.image.documentation=https://github.com/tum-gis/ckan-docker - name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-${{ matrix.context }} uses: docker/build-push-action@v6 @@ -69,7 +70,8 @@ jobs: labels: | maintainer=Chair of Geoinformatics, Technical University of Munich (TUM) org.opencontainers.image.vendor=Chair of Geoinformatics, Technical University of Munich (TUM) - org.opencontainers.image.title=ckan-sddi-docker + org.opencontainers.image.title=ckan-sddi-base-docker-edge-debug + org.opencontainers.image.documentation=https://github.com/tum-gis/ckan-docker - name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-${{ matrix.context }} uses: docker/build-push-action@v6 diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 951d1776..8ae21f10 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -56,6 +56,7 @@ jobs: maintainer=Chair of Geoinformatics, Technical University of Munich (TUM) org.opencontainers.image.vendor=Chair of Geoinformatics, Technical University of Munich (TUM) org.opencontainers.image.title=ckan-sddi-base-docker-dev + org.opencontainers.image.documentation=https://github.com/tum-gis/ckan-docker - name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-base-pr-${{github.event.number}} uses: docker/build-push-action@v6 @@ -85,6 +86,7 @@ jobs: maintainer=Chair of Geoinformatics, Technical University of Munich (TUM) org.opencontainers.image.vendor=Chair of Geoinformatics, Technical University of Munich (TUM) org.opencontainers.image.title=ckan-sddi-base-docker-dev-debug + org.opencontainers.image.documentation=https://github.com/tum-gis/ckan-docker - name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-base-pr-${{github.event.number}}-debug uses: docker/build-push-action@v6 @@ -118,6 +120,7 @@ jobs: maintainer=Chair of Geoinformatics, Technical University of Munich (TUM) org.opencontainers.image.vendor=Chair of Geoinformatics, Technical University of Munich (TUM) org.opencontainers.image.title=ckan-sddi-docker-dev + org.opencontainers.image.documentation=https://github.com/tum-gis/ckan-docker - name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-pr-${{github.event.number}} uses: docker/build-push-action@v6 @@ -148,6 +151,7 @@ jobs: maintainer=Chair of Geoinformatics, Technical University of Munich (TUM) org.opencontainers.image.vendor=Chair of Geoinformatics, Technical University of Munich (TUM) org.opencontainers.image.title=ckan-sddi-docker-dev-debug + org.opencontainers.image.documentation=https://github.com/tum-gis/ckan-docker - name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-sddi-dev:sddi-pr-${{github.event.number}}-debug uses: docker/build-push-action@v6 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 56c7319c..f6684be6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -72,7 +72,7 @@ jobs: labels: | maintainer=Chair of Geoinformatics, Technical University of Munich (TUM) org.opencontainers.image.vendor=Chair of Geoinformatics, Technical University of Munich (TUM) - org.opencontainers.image.title=ckan-sddi-docker + org.opencontainers.image.title=ckan-sddi-docker-debug org.opencontainers.image.documentation=https://github.com/tum-gis/ckan-docker - name: Build and publish ${{ env.REGISTRY }}/tum-gis/ckan-${{ matrix.context }}-debug From 53c4f3eb84059cd0a4c6ae6cde404460dc2880c7 Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Fri, 4 Apr 2025 10:08:20 +0200 Subject: [PATCH 88/95] 3.0.1 --- CHANGELOG.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 703b652a..2a0d3836 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). For releases `< 1.0.0` minor version steps may indicate breaking changes too. +## [3.0.1] - 2025-04-04 + +### Changed + +- Maintenance for build workflows + ## [3.0.0] - 2025-03-21 ### Added @@ -253,11 +259,10 @@ for production environments.** ### Known issues -[Unreleased]: https://github.com/tum-gis/ckan-docker/compare/3.0.0...HEAD +[Unreleased]: https://github.com/tum-gis/ckan-docker/compare/3.0.1...HEAD +[3.0.1]: https://github.com/tum-gis/ckan-docker/compare/3.0.0...3.0.1 [3.0.0]: https://github.com/tum-gis/ckan-docker/compare/2.1.2...3.0.0 [2.1.2]: https://github.com/tum-gis/ckan-docker/compare/2.1.1...2.1.2 -[2.1.1]: https://github.com/tum-gis/ckan-docker/compare/2.1.0...2.1.1 -[2.1.0]: https://github.com/tum-gis/ckan-docker/compare/2.0.1...2.1.0 [2.0.1]: https://github.com/tum-gis/ckan-docker/compare/2.0.0...2.0.1 [2.0.0]: https://github.com/tum-gis/ckan-docker/compare/1.2.0...2.0.0 [1.2.0]: https://github.com/tum-gis/ckan-docker/compare/1.1.3...1.2.0 From 17c85489b617b731aef2842bcdae8378845a7c7b Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Fri, 4 Apr 2025 10:24:00 +0200 Subject: [PATCH 89/95] rename CKAN_VERSION ARG and stages naming --- sddi-base/Dockerfile | 6 +++--- sddi/Dockerfile | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index 5c980a31..d0646764 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -1,9 +1,9 @@ ############################################################################### # Extbuild stage ############################################################################### -ARG CKAN_VERSION_BUILD_STAGE=2.11.1 +ARG CKAN_VERSION=2.11.1 -FROM ckan/ckan-base:${CKAN_VERSION_BUILD_STAGE} as extbuild +FROM ckan/ckan-base:${CKAN_VERSION} AS extbuild USER root @@ -90,7 +90,7 @@ RUN set -ex && \ ############################################################################### # Runtime stage ############################################################################### -FROM ckan/ckan-base:${CKAN_VERSION_BUILD_STAGE} as runtime +FROM ckan/ckan-base:${CKAN_VERSION} AS runtime ENV CKAN_DIR=${SRC_DIR}/ckan ENV DATA_DIR=/srv/app/data diff --git a/sddi/Dockerfile b/sddi/Dockerfile index 448f6a23..2af32fd8 100644 --- a/sddi/Dockerfile +++ b/sddi/Dockerfile @@ -5,7 +5,7 @@ ARG BASEIMAGE_REPOSITORY=ghcr.io/tum-gis/ckan-sddi-base ARG BASEIMAGE_VERSION=latest ARG CKAN_VERSION_BUILD_STAGE=2.11.1 -FROM ckan/ckan-base:${CKAN_VERSION_BUILD_STAGE} as extbuild +FROM ckan/ckan-base:${CKAN_VERSION_BUILD_STAGE} AS extbuild USER root @@ -84,7 +84,7 @@ RUN set -ex && \ ############################################################################### # Runtime stage ############################################################################### -FROM ${BASEIMAGE_REPOSITORY}:${BASEIMAGE_VERSION} +FROM ${BASEIMAGE_REPOSITORY}:${BASEIMAGE_VERSION} AS runtime ENV CKAN_DIR=${SRC_DIR}/ckan ENV DATA_DIR=/srv/app/data From aa56ced30fd0017136628f0b5f36ec8140b2f5fc Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Fri, 4 Apr 2025 10:27:42 +0200 Subject: [PATCH 90/95] rename CKAN_VERSION arg --- sddi/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sddi/Dockerfile b/sddi/Dockerfile index 2af32fd8..dc0d6dc0 100644 --- a/sddi/Dockerfile +++ b/sddi/Dockerfile @@ -3,9 +3,9 @@ ############################################################################### ARG BASEIMAGE_REPOSITORY=ghcr.io/tum-gis/ckan-sddi-base ARG BASEIMAGE_VERSION=latest -ARG CKAN_VERSION_BUILD_STAGE=2.11.1 +ARG CKAN_VERSION=2.11.1 -FROM ckan/ckan-base:${CKAN_VERSION_BUILD_STAGE} AS extbuild +FROM ckan/ckan-base:${CKAN_VERSION} AS extbuild USER root From a95165ca212eddd17e75906f2e5ea96f26fc07a4 Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Sun, 6 Apr 2025 21:57:32 +0200 Subject: [PATCH 91/95] ckan 2.11.2 --- README.md | 4 ++-- sddi-base/Dockerfile | 2 +- sddi-base/Dockerfile.debug | 2 +- sddi/Dockerfile | 2 +- sddi/Dockerfile.debug | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6e40d961..7afedf50 100644 --- a/README.md +++ b/README.md @@ -146,8 +146,8 @@ This registry will be cleared periodically. ### CKAN and CKAN extension versions -CKAN version: `2.11.1` -CKAN base image: `ckan/ckan-base:2.11.1` +CKAN version: `2.11.2` +CKAN base image: `ckan/ckan-base:2.11.2` The CKAN catalog platform uses several extensions to provide the functionality needed for the SDDI concept. The table below lists the included extensions with diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index d0646764..d1e8ab33 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -1,7 +1,7 @@ ############################################################################### # Extbuild stage ############################################################################### -ARG CKAN_VERSION=2.11.1 +ARG CKAN_VERSION=2.11.2 FROM ckan/ckan-base:${CKAN_VERSION} AS extbuild diff --git a/sddi-base/Dockerfile.debug b/sddi-base/Dockerfile.debug index 823c4a98..386b8cd4 100644 --- a/sddi-base/Dockerfile.debug +++ b/sddi-base/Dockerfile.debug @@ -3,7 +3,7 @@ ARG BASEIMAGE_VERSION=edge FROM ${BASEIMAGE_REPOSITORY}:${BASEIMAGE_VERSION} -ARG CKAN_VERSION=2.11.1 +ARG CKAN_VERSION=2.11.2 ENV CKAN_VERSION=${CKAN_VERSION} USER root diff --git a/sddi/Dockerfile b/sddi/Dockerfile index dc0d6dc0..ed6f8074 100644 --- a/sddi/Dockerfile +++ b/sddi/Dockerfile @@ -3,7 +3,7 @@ ############################################################################### ARG BASEIMAGE_REPOSITORY=ghcr.io/tum-gis/ckan-sddi-base ARG BASEIMAGE_VERSION=latest -ARG CKAN_VERSION=2.11.1 +ARG CKAN_VERSION=2.11.2 FROM ckan/ckan-base:${CKAN_VERSION} AS extbuild diff --git a/sddi/Dockerfile.debug b/sddi/Dockerfile.debug index 344a2d4d..f27428c7 100644 --- a/sddi/Dockerfile.debug +++ b/sddi/Dockerfile.debug @@ -3,7 +3,7 @@ ARG BASEIMAGE_VERSION=edge FROM ${BASEIMAGE_REPOSITORY}:${BASEIMAGE_VERSION} -ARG CKAN_VERSION=2.11.1 +ARG CKAN_VERSION=2.11.2 ENV CKAN_VERSION=${CKAN_VERSION} USER root From 26038cbd28ecf7a81f574489c08448f829bc39d9 Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Mon, 7 Apr 2025 10:31:58 +0200 Subject: [PATCH 92/95] remove ckanext-envvars, it come with base image --- sddi-base/Dockerfile | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/sddi-base/Dockerfile b/sddi-base/Dockerfile index d1e8ab33..554225c4 100644 --- a/sddi-base/Dockerfile +++ b/sddi-base/Dockerfile @@ -35,13 +35,6 @@ RUN set -ex && \ curl -o /wheels/ckanext-hierarchy.txt https://raw.githubusercontent.com/ckan/ckanext-hierarchy/${CKANEXT_HIERARCHY_VERSION}/requirements.txt && \ ls -lah /wheels -# ckanext-envvars ############################################################# -ARG CKANEXT_ENVVARS_VERSION="v0.0.6" -ENV CKANEXT_ENVVARS_VERSION=${CKANEXT_ENVVARS_VERSION} - -RUN set -ex && \ - pip wheel --wheel-dir=/wheels git+https://github.com/ckan/ckanext-envvars.git@${CKANEXT_ENVVARS_VERSION}#egg=ckanext-envvars - # ckanext-scheming ############################################################ ARG CKANEXT_SCHEMING_VERSION="27035f4" ENV CKANEXT_SCHEMING_VERSION=${CKANEXT_SCHEMING_VERSION} @@ -142,10 +135,6 @@ RUN set -ex && \ pip install --find-links=${APP_DIR}/ext_wheels -r ${APP_DIR}/ext_wheels/ckanext-hierarchy.txt && \ pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-hierarchy -# ckanext-envvars ############################################################ -RUN set -ex && \ - pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-envvars - # ckanext-scheming ############################################################ RUN set -ex && \ pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-scheming From 5acf418ddb39a2c8ec667a08a6b02ee9266cc253 Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Mon, 7 Apr 2025 10:47:05 +0200 Subject: [PATCH 93/95] fix local build scripts --- build-noCache.sh | 5 ++--- build-push-noCache.sh | 4 ++-- build-push.sh | 4 ++-- build.sh | 4 ++-- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/build-noCache.sh b/build-noCache.sh index fd49f74a..86c31b50 100644 --- a/build-noCache.sh +++ b/build-noCache.sh @@ -35,9 +35,8 @@ docker build . \ # sddi:TAG-debug docker build . \ --no-cache \ - --build-arg "BASEIMAGE_REPOSITORY=$IMAGE_REPOSITORY/ckan-sddi-base" \ - --build-arg BASEIMAGE_VERSION=${IMAGE_TAG}-debug \ + --build-arg "BASEIMAGE_REPOSITORY=$IMAGE_REPOSITORY/ckan-sddi" \ + --build-arg BASEIMAGE_VERSION=${IMAGE_TAG} \ -t "$IMAGE_REPOSITORY/ckan-sddi:${IMAGE_TAG}-debug" printf "\n\n" - diff --git a/build-push-noCache.sh b/build-push-noCache.sh index 35512f2d..8468ca55 100644 --- a/build-push-noCache.sh +++ b/build-push-noCache.sh @@ -40,8 +40,8 @@ docker push "$IMAGE_REPOSITORY/ckan-sddi:${IMAGE_TAG}" # sddi:TAG-debug docker build . \ --no-cache \ - --build-arg "BASEIMAGE_REPOSITORY=$IMAGE_REPOSITORY/ckan-sddi-base" \ - --build-arg BASEIMAGE_VERSION=${IMAGE_TAG}-debug \ + --build-arg "BASEIMAGE_REPOSITORY=$IMAGE_REPOSITORY/ckan-sddi" \ + --build-arg BASEIMAGE_VERSION=${IMAGE_TAG} \ -t "$IMAGE_REPOSITORY/ckan-sddi:${IMAGE_TAG}-debug" docker push "$IMAGE_REPOSITORY/ckan-sddi:${IMAGE_TAG}-debug" diff --git a/build-push.sh b/build-push.sh index e7c7cb19..788530b3 100644 --- a/build-push.sh +++ b/build-push.sh @@ -36,8 +36,8 @@ docker push "$IMAGE_REPOSITORY/ckan-sddi:${IMAGE_TAG}" # sddi:TAG-debug docker build . \ - --build-arg "BASEIMAGE_REPOSITORY=$IMAGE_REPOSITORY/ckan-sddi-base" \ - --build-arg BASEIMAGE_VERSION=${IMAGE_TAG}-debug \ + --build-arg "BASEIMAGE_REPOSITORY=$IMAGE_REPOSITORY/ckan-sddi" \ + --build-arg BASEIMAGE_VERSION=${IMAGE_TAG} \ -t "$IMAGE_REPOSITORY/ckan-sddi:${IMAGE_TAG}-debug" docker push "$IMAGE_REPOSITORY/ckan-sddi:${IMAGE_TAG}-debug" diff --git a/build.sh b/build.sh index b02c4d77..ae381e47 100644 --- a/build.sh +++ b/build.sh @@ -31,8 +31,8 @@ docker build . \ # sddi:TAG-debug docker build . \ - --build-arg "BASEIMAGE_REPOSITORY=$IMAGE_REPOSITORY/ckan-sddi-base" \ - --build-arg BASEIMAGE_VERSION=${IMAGE_TAG}-debug \ + --build-arg "BASEIMAGE_REPOSITORY=$IMAGE_REPOSITORY/ckan-sddi" \ + --build-arg BASEIMAGE_VERSION=${IMAGE_TAG} \ -t "$IMAGE_REPOSITORY/ckan-sddi:${IMAGE_TAG}-debug" printf "\n\n" From 61ec2697830fd61754dadf0c481f7d73e2c0d6f2 Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Wed, 9 Apr 2025 10:16:31 +0200 Subject: [PATCH 94/95] 3.1.0 --- CHANGELOG.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a0d3836..d6c5d89c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). For releases `< 1.0.0` minor version steps may indicate breaking changes too. +## [3.1.0] - 2025-04-08 + +### Changed + +- Bump CKAN version `2.11.1` -> `2.11.2` + +### Remove + +- Removed `ckanext-envvars` as it is shipped with base image + ## [3.0.1] - 2025-04-04 ### Changed @@ -259,7 +269,8 @@ for production environments.** ### Known issues -[Unreleased]: https://github.com/tum-gis/ckan-docker/compare/3.0.1...HEAD +[Unreleased]: https://github.com/tum-gis/ckan-docker/compare/3.1.0...HEAD +[3.1.0]: https://github.com/tum-gis/ckan-docker/compare/3.0.1...3.1.0 [3.0.1]: https://github.com/tum-gis/ckan-docker/compare/3.0.0...3.0.1 [3.0.0]: https://github.com/tum-gis/ckan-docker/compare/2.1.2...3.0.0 [2.1.2]: https://github.com/tum-gis/ckan-docker/compare/2.1.1...2.1.2 From 6c5092083fb9cdd9c85bec766d6f9b8b5d093313 Mon Sep 17 00:00:00 2001 From: Bruno Willenborg Date: Wed, 9 Apr 2025 12:56:54 +0200 Subject: [PATCH 95/95] ckanext-relation -> 1.1.1 --- CHANGELOG.md | 1 + README.md | 2 +- sddi/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6c5d89c..f745c569 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ For releases `< 1.0.0` minor version steps may indicate breaking changes too. ### Changed - Bump CKAN version `2.11.1` -> `2.11.2` +- Bump `ckanext-relation` `1.1.0` -> `1.1.1` ### Remove diff --git a/README.md b/README.md index 7afedf50..eb9c0157 100644 --- a/README.md +++ b/README.md @@ -168,7 +168,7 @@ are alway pinned to a stable release number or commit hash. | [`ckanext-geoview` ](https://github.com/ckan/ckanext-geoview) | `v0.2.2` |:heavy_check_mark: |:heavy_check_mark: | Configure and share CKAN dataset metadata forms. | | [`ckanext-clamav` ](https://github.com/mutantsan/ckanext-clamav) | `a1d23ac` |:heavy_check_mark: | :heavy_check_mark: |CKAN extension that integrates ClamAV antivirus scanning to ensure the security of uploaded files by automatically checking them for malware.| | [`ckanext-dcat` ](https://github.com/ckan/ckanext-dcat ) | `v1.5.1` |:heavy_check_mark: | :heavy_check_mark: |Allow CKAN to expose and consume metadata from other catalogs using RDF documents serialized using DCAT.| -| [`ckanext-relation-sddi`](https://github.com/tum-gis/ckanext-relation-sddi ) | `1.1.0` | | :heavy_check_mark: | Enables to create and visualize different types of relations (*realated_to*, *depends_on*, *part_of*) between catalog entries. | +| [`ckanext-relation-sddi`](https://github.com/tum-gis/ckanext-relation-sddi ) | `1.1.1` | | :heavy_check_mark: | Enables to create and visualize different types of relations (*realated_to*, *depends_on*, *part_of*) between catalog entries. | | [`ckanext-datesearch`](https://github.com/MarijaKnezevic/ckanext-datesearch) | `1.1.0`|| :heavy_check_mark: | Provides the ability to search for datasets according to a given time frame. The search includes all datasets, in which the time of validity overlaps in at least one second with the search time frame. | | [`ckanext-spatial`](https://github.com/ckan/ckanext-spatial) | `v2.3.0` | |:heavy_check_mark: | Enables geospatial capabilities to CKAN instance. | | [`ckanext-scheme-sddi`](https://github.com/MarijaKnezevic/ckanext-scheme-sddi) | `0.0.1` || :heavy_check_mark: | This plugin is extending CKAN schema definition, validation, and custom field support accordingly to SDDI needs. | diff --git a/sddi/Dockerfile b/sddi/Dockerfile index ed6f8074..a5996eff 100644 --- a/sddi/Dockerfile +++ b/sddi/Dockerfile @@ -26,7 +26,7 @@ RUN apt-get update && apt-get install -y \ RUN pip install -U markupsafe==2.0.1 sqlalchemy==1.4.41 # ckanext-relation ############################################################ -ARG CKANEXT_RELATION_VERSION="1.1.0" +ARG CKANEXT_RELATION_VERSION="1.1.1" ENV CKANEXT_RELATION_VERSION=${CKANEXT_RELATION_VERSION} RUN set -ex && \