diff --git a/.env.example b/.env.example index 1c5f13cb..45b65213 100644 --- a/.env.example +++ b/.env.example @@ -160,6 +160,8 @@ CKANEXT__SCHEMINGDCAT_ORGANIZATION_CUSTOM_FACETS=True CKANEXT__SCHEMINGDCAT_GROUP_CUSTOM_FACETS=True CKANEXT__SCHEMINGDCAT_DEFAULT_PACKAGE_ITEM_ICON="theme" CKANEXT__SCHEMINGDCAT_DEFAULT_PACKAGE_ITEM_SHOW_SPATIAL=True +CKANEXT__SCHEMINGDCAT_SHOW_METADATA_TEMPLATES_TOOLBAR=True +CKANEXT__METADATA_TEMPLATES_SEARCH_IDENTIFIER="*iepnb-plantilla*" # ckanext-pages CKANEXT__PAGES__ALOW_HTML=False diff --git a/README.md b/README.md index 32f0fe82..d70fc182 100644 --- a/README.md +++ b/README.md @@ -210,24 +210,25 @@ See [CKAN Images](#ckan-images) for more details of what happens when using deve #### Create an extension You can use the ckan [extension](https://docs.ckan.org/en/latest/extensions/tutorial.html#creating-a-new-extension) instructions to create a CKAN extension, only executing the command inside the CKAN container and setting the mounted `src/` folder as output: - docker compose -f docker compose.dev.yml exec ckan-dev /bin/sh -c "ckan generate extension --output-dir /srv/app/src_extensions" - -![extension](https://user-images.githubusercontent.com/54408245/220623568-b4e074c7-6d07-4d27-ae29-35ce70961463.png) - - -The new extension files and directories are created in the `/srv/app/src_extensions/` folder in the running container. They will also exist in the local src/ directory as local `/src` directory is mounted as `/srv/app/src_extensions/` on the ckan container. You might need to change the owner of its folder to have the appropiate permissions. - -##### Running HTTPS on development mode - -Sometimes is useful to run your local development instance under HTTPS, for instance if you are using authentication extensions like [ckanext-saml2auth](https://github.com/keitaroinc/ckanext-saml2auth). To enable it, set the following in your `.env` file: - - USE_HTTPS_FOR_DEV=true + ```bash + docker compose -f docker-compose.dev.yml exec ckan-dev /bin/sh -c "ckan -c /srv/app/ckan.ini generate extension --output-dir /srv/app/src_extensions" + ``` -and update the site URL setting: +Then, answer the prompts to configure the plugin: - CKAN_SITE_URL=https://localhost:5000 + ```bash + Extension's name [must begin 'ckanext-']: ckanext-newextension + Author's name []: Joe Bloggs + Author's email []: joe@bloggs.com + Your Github user or organization name []: joebloggs + Brief description of the project []: test creating a new extension + List of keywords (separated by spaces) [CKAN]: ckanext-newextension + Do you want to include code examples? [y/N]: y + + Written: /srv/app/src_extensions/ckanext-newextension + ``` -After recreating the `ckan-dev` container, you should be able to access CKAN at https://localhost:5000 +The new extension files and directories are created in the `/srv/app/src_extensions/` folder in the running container. They will also exist in the local src/ directory as local `/src` directory is mounted as `/srv/app/src_extensions/` on the ckan container. You might need to change the owner of its folder to have the appropiate permissions. ## CKAN images ![CKAN Docker Platform](/doc/img/ckan-docker-images.png) diff --git a/ckan/docker-entrypoint.d/02_setup_scheming.sh b/ckan/docker-entrypoint.d/02_setup_scheming.sh index 85afc64f..83fc3842 100644 --- a/ckan/docker-entrypoint.d/02_setup_scheming.sh +++ b/ckan/docker-entrypoint.d/02_setup_scheming.sh @@ -15,7 +15,9 @@ ckan config-tool $CKAN_INI \ "schemingdcat.group_custom_facets=$CKANEXT__SCHEMINGDCAT_GROUP_CUSTOM_FACETS" \ "schemingdcat.geometadata_base_uri=$CKANEXT__SCHEMINGDCAT_GEOMETADATA_BASE_URI" \ "schemingdcat.default_package_item_icon=$CKANEXT__SCHEMINGDCAT_DEFAULT_PACKAGE_ITEM_ICON" \ - "schemingdcat.default_package_item_show_spatial=$CKANEXT__SCHEMINGDCAT_DEFAULT_PACKAGE_ITEM_SHOW_SPATIAL" + "schemingdcat.default_package_item_show_spatial=$CKANEXT__SCHEMINGDCAT_DEFAULT_PACKAGE_ITEM_SHOW_SPATIAL" \ + "schemingdcat.show_metadata_templates_toolbar=$CKANEXT__SCHEMINGDCAT_SHOW_METADATA_TEMPLATES_TOOLBAR" \ + "schemingdcat.metadata_templates_search_identifier=$CKANEXT__METADATA_TEMPLATES_SEARCH_IDENTIFIER" echo "[docker-entrypoint.02_setup_scheming] Rebuild index" ckan -c $CKAN_INI search-index rebuild \ No newline at end of file diff --git a/solr/Dockerfile.iepnb b/solr/Dockerfile.iepnb index fb128165..fdac213a 100644 --- a/solr/Dockerfile.iepnb +++ b/solr/Dockerfile.iepnb @@ -55,7 +55,7 @@ ENV SOLR_BBOX_FIELDS ' \ \ \ - \ + \ \ ' \ '' \