From 076d559c8168242f07372594db28b7f4b86ab41e Mon Sep 17 00:00:00 2001 From: MuhammadIsmailShahzad Date: Wed, 8 Nov 2023 21:44:30 +0500 Subject: [PATCH 1/3] Enable ckanext-issues --- ckan-backend-dev/.env.example | 2 +- ckan-backend-dev/ckan/Dockerfile.dev | 3 ++- deployment/ckan/Dockerfile | 5 +++-- deployment/helm-templates/values.yaml.dev.template | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ckan-backend-dev/.env.example b/ckan-backend-dev/.env.example index 2723f2950..05c79e0e3 100644 --- a/ckan-backend-dev/.env.example +++ b/ckan-backend-dev/.env.example @@ -81,7 +81,7 @@ DATAPUSHER_REWRITE_RESOURCES=True DATAPUSHER_REWRITE_URL=http://ckan-dev:5000 # Extensions -CKAN__PLUGINS=image_view text_view webpage_view resource_proxy datatables_view datastore datapusher activity s3filestore scheming_datasets scheming_organizations scheming_groups wri auth hierarchy_display hierarchy_form hierarchy_group_form envvars +CKAN__PLUGINS=image_view text_view webpage_view resource_proxy datatables_view datastore datapusher activity s3filestore scheming_datasets scheming_organizations scheming_groups wri auth hierarchy_display hierarchy_form hierarchy_group_form issues envvars CKAN__VIEWS__DEFAULT_VIEWS=image_view text_view webpage_view datatables_view CKAN__HARVEST__MQ__TYPE=redis CKAN__HARVEST__MQ__HOSTNAME=redis diff --git a/ckan-backend-dev/ckan/Dockerfile.dev b/ckan-backend-dev/ckan/Dockerfile.dev index 01da60151..4f5db36cd 100644 --- a/ckan-backend-dev/ckan/Dockerfile.dev +++ b/ckan-backend-dev/ckan/Dockerfile.dev @@ -28,7 +28,8 @@ RUN pip3 install -e 'git+https://github.com/datopian/ckanext-scheming.git@ckan-2 pip3 install -r 'https://raw.githubusercontent.com/datopian/ckanext-s3filestore/wri/cost-splitting-orgs/requirements.txt' && \ pip3 install -r 'https://raw.githubusercontent.com/datopian/ckanext-s3filestore/wri/cost-splitting-orgs/dev-requirements.txt' && \ pip3 install -e 'git+https://github.com/datopian/ckanext-auth.git@auth-object-return-token#egg=ckanext-auth' && \ - pip3 install -e 'git+https://github.com/ckan/ckanext-hierarchy.git@master#egg=ckanext-hierarchy' + pip3 install -e 'git+https://github.com/ckan/ckanext-hierarchy.git@master#egg=ckanext-hierarchy' && \ + pip3 install -e 'git+https://github.com/datopian/ckanext-issues.git@ckan-2.10#egg=ckanext-issues' # Update ckanext-s3filestore test.ini with minio credentials RUN sed -i "s|ckanext.s3filestore.aws_access_key_id = test-access-key|ckanext.s3filestore.aws_access_key_id = ${AWS_ACCESS_KEY_ID}|g" src/ckanext-s3filestore/test.ini && \ diff --git a/deployment/ckan/Dockerfile b/deployment/ckan/Dockerfile index 39d670acc..b9e2d6dcb 100644 --- a/deployment/ckan/Dockerfile +++ b/deployment/ckan/Dockerfile @@ -10,7 +10,8 @@ RUN pip3 install -e 'git+https://github.com/datopian/ckanext-scheming.git@ckan-2 pip3 install -r 'https://raw.githubusercontent.com/datopian/ckanext-s3filestore/wri/cost-splitting-orgs/requirements.txt' && \ pip3 install -r 'https://raw.githubusercontent.com/datopian/ckanext-s3filestore/wri/cost-splitting-orgs/dev-requirements.txt' && \ pip3 install -e 'git+https://github.com/datopian/ckanext-auth.git@auth-object-return-token#egg=ckanext-auth' && \ - pip3 install -e 'git+https://github.com/ckan/ckanext-hierarchy.git@master#egg=ckanext-hierarchy' + pip3 install -e 'git+https://github.com/ckan/ckanext-hierarchy.git@master#egg=ckanext-hierarchy' && \ + pip3 install -e 'git+https://github.com/datopian/ckanext-issues.git@ckan-2.10#egg=ckanext-issues COPY ckanext-wri ${APP_DIR}/src/ckanext-wri USER root @@ -27,7 +28,7 @@ RUN cd ${APP_DIR}/src/ckanext-wri && pip3 install -r requirements.txt && pip3 in # fi ; \ # done -ENV CKAN__PLUGINS image_view text_view webpage_view resource_proxy datatables_view datastore datapusher activity s3filestore scheming_datasets scheming_organizations scheming_groups wri auth hierarchy_display hierarchy_form hierarchy_group_form envvars +ENV CKAN__PLUGINS image_view text_view webpage_view resource_proxy datatables_view datastore datapusher activity s3filestore scheming_datasets scheming_organizations scheming_groups wri auth hierarchy_display hierarchy_form hierarchy_group_form issues envvars RUN ckan config-tool ${CKAN_INI} "ckan.plugins = ${CKAN__PLUGINS}" diff --git a/deployment/helm-templates/values.yaml.dev.template b/deployment/helm-templates/values.yaml.dev.template index cb158385a..ff241d5aa 100644 --- a/deployment/helm-templates/values.yaml.dev.template +++ b/deployment/helm-templates/values.yaml.dev.template @@ -32,7 +32,7 @@ ckan: CKAN__SITE_TITLE: x demo CKAN__STORAGE_PATH: /tmp CKAN__VIEWS__DEFAULT_VIEWS: recline_view text_view image_view pdf_view geojson_view - CKAN__PLUGINS: image_view text_view webpage_view resource_proxy datatables_view datastore datapusher activity s3filestore scheming_datasets scheming_organizations scheming_groups wri auth hierarchy_display hierarchy_form hierarchy_group_form envvars + CKAN__PLUGINS: image_view text_view webpage_view resource_proxy datatables_view datastore datapusher activity s3filestore scheming_datasets scheming_organizations scheming_groups wri auth hierarchy_display hierarchy_form hierarchy_group_form issues envvars CKAN__AUTH__CREATE_UNOWNED_DATASET: "True" CKAN__AUTH__ALLOW_DATASET_COLLABORATORS: "True" CKAN__AUTH__ALLOW_ADMIN_COLLABORATORS: "True" From e9a08d789e10c060b81b7dbaa658cfd91dd74612 Mon Sep 17 00:00:00 2001 From: MuhammadIsmailShahzad Date: Wed, 8 Nov 2023 21:49:34 +0500 Subject: [PATCH 2/3] [Dockerfile] Typo fix: Add missing quote --- deployment/ckan/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/ckan/Dockerfile b/deployment/ckan/Dockerfile index b9e2d6dcb..751a406bc 100644 --- a/deployment/ckan/Dockerfile +++ b/deployment/ckan/Dockerfile @@ -11,7 +11,7 @@ RUN pip3 install -e 'git+https://github.com/datopian/ckanext-scheming.git@ckan-2 pip3 install -r 'https://raw.githubusercontent.com/datopian/ckanext-s3filestore/wri/cost-splitting-orgs/dev-requirements.txt' && \ pip3 install -e 'git+https://github.com/datopian/ckanext-auth.git@auth-object-return-token#egg=ckanext-auth' && \ pip3 install -e 'git+https://github.com/ckan/ckanext-hierarchy.git@master#egg=ckanext-hierarchy' && \ - pip3 install -e 'git+https://github.com/datopian/ckanext-issues.git@ckan-2.10#egg=ckanext-issues + pip3 install -e 'git+https://github.com/datopian/ckanext-issues.git@ckan-2.10#egg=ckanext-issues' COPY ckanext-wri ${APP_DIR}/src/ckanext-wri USER root From 6fcd7dcf553895ef3651ab82629ded3b2277649b Mon Sep 17 00:00:00 2001 From: Muhammad Ismail Shahzad <57398621+MuhammadIsmailShahzad@users.noreply.github.com> Date: Thu, 9 Nov 2023 22:12:02 +0500 Subject: [PATCH 3/3] [Dockerfile.dev] Sync base image for dev and local env --- ckan-backend-dev/ckan/Dockerfile.dev | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ckan-backend-dev/ckan/Dockerfile.dev b/ckan-backend-dev/ckan/Dockerfile.dev index 4f5db36cd..96a29f6c0 100644 --- a/ckan-backend-dev/ckan/Dockerfile.dev +++ b/ckan-backend-dev/ckan/Dockerfile.dev @@ -1,5 +1,4 @@ -FROM viderum/ckan:v2.10-dev - +FROM viderum/ckan:v2.10-dev-security-fix # Set up environment variables ENV APP_DIR=/srv/app @@ -74,4 +73,4 @@ RUN ckan config-tool ${CKAN_INI} "api_token.jwt.algorithm = RS256" && \ ckan config-tool ${CKAN_INI} "api_token.jwt.encode.secret = file:${APP_DIR}/jwtRS256.key" && \ ckan config-tool ${CKAN_INI} "api_token.jwt.decode.secret = file:${APP_DIR}/jwtRS256.key.pub" -CMD ["sh", "-c", "${APP_DIR}/start_ckan_development.sh"] \ No newline at end of file +CMD ["sh", "-c", "${APP_DIR}/start_ckan_development.sh"]