From e1d957468940dc1fc6be6b344918fac2a48ea966 Mon Sep 17 00:00:00 2001 From: mjanez <96422458+mjanez@users.noreply.github.com> Date: Mon, 15 Apr 2024 08:44:58 +0200 Subject: [PATCH 1/7] chore: Add option to ckan.search.solr_allowed_query_parsers config for spatial search --- .env.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.example b/.env.example index e4867232..69beec90 100644 --- a/.env.example +++ b/.env.example @@ -114,7 +114,7 @@ CKAN__PREVIEW__XML_FORMATS="xml rdf rdf+xml owl+xml atom rss turtle ttl n3 n-tri CKAN__PREVIEW__TEXT_FORMATS="text plain text/plain text/turtle csv tsv rss txt json" CKAN__PREVIEW__LOADABLE="html htm rdf+xml owl+xml xml n3 n-triples turtle plain atom csv tsv rss txt json arcgis_rest" # ckanext-spatial: Allow Solr local params: https://github.com/ckan/ckanext-spatial/issues/328 -CKAN__SEARCH__SOLR_ALLOWED_QUERY_PARSERS = field +CKAN__SEARCH__SOLR_ALLOWED_QUERY_PARSERS=field ## Resource Proxy settings ### Preview size limit, default: 1MB From fa501274f0a42e68010a096a7370dae9ff85d243 Mon Sep 17 00:00:00 2001 From: mjanez <96422458+mjanez@users.noreply.github.com> Date: Mon, 15 Apr 2024 08:39:55 +0000 Subject: [PATCH 2/7] Add CORS envvars To enable CORS, use the new ckan.cors configuration settings (ckan.cors.origin_allow_all and ckan.cors.origin_whitelist).CKAN__CORS__ORIGIN_ALLOW_ALL=True: Access-Control-Allow-Origin set to the wildcard value * and using CKAN__CORS__ORIGIN_WHITELIST, to add domains, e.g. "http://www.myremotedomain1.com http://myremotedomain1.com" --- .env.example | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.env.example b/.env.example index 69beec90..b1159f93 100644 --- a/.env.example +++ b/.env.example @@ -115,6 +115,9 @@ CKAN__PREVIEW__TEXT_FORMATS="text plain text/plain text/turtle csv tsv rss txt j CKAN__PREVIEW__LOADABLE="html htm rdf+xml owl+xml xml n3 n-triples turtle plain atom csv tsv rss txt json arcgis_rest" # ckanext-spatial: Allow Solr local params: https://github.com/ckan/ckanext-spatial/issues/328 CKAN__SEARCH__SOLR_ALLOWED_QUERY_PARSERS=field +# CORS Settings. If True, all origins will be allowed (the response header Access-Control-Allow-Origin is set to ‘*’). If False, only origins from the ckan.cors.origin_whitelist setting will be allowed. +CKAN__CORS__ORIGIN_ALLOW_ALL=False +CKAN__CORS__ORIGIN_WHITELIST="" ## Resource Proxy settings ### Preview size limit, default: 1MB From 7309d15bc0e8d91a245cef01a938fb762a2ef7d2 Mon Sep 17 00:00:00 2001 From: mjanez <96422458+mjanez@users.noreply.github.com> Date: Mon, 15 Apr 2024 10:33:28 +0000 Subject: [PATCH 3/7] Remove unnecesary TODO --- ckan/docker-entrypoint.d/01_setup_xloader.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ckan/docker-entrypoint.d/01_setup_xloader.sh b/ckan/docker-entrypoint.d/01_setup_xloader.sh index 9d0e8946..b360431d 100644 --- a/ckan/docker-entrypoint.d/01_setup_xloader.sh +++ b/ckan/docker-entrypoint.d/01_setup_xloader.sh @@ -27,8 +27,4 @@ ckan config-tool $CKAN_INI \ # Create ckanext-xloader API_TOKEN echo "[docker-entrypoint.01_setup_xloader] Set up ckanext.xloader.api_token in the CKAN config file" -ckan config-tool $CKAN_INI "ckanext.xloader.api_token=$(ckan -c $CKAN_INI user token add ckan_admin xloader | tail -n 1 | tr -d '\t')" - -#TODO: Setup worker background -#echo "[docker-entrypoint.01_setup_xloader] Set up CKAN jobs worker" -#ckan -c $CKAN_INI jobs worker default \ No newline at end of file +ckan config-tool $CKAN_INI "ckanext.xloader.api_token=$(ckan -c $CKAN_INI user token add ckan_admin xloader | tail -n 1 | tr -d '\t')" \ No newline at end of file From 641731de1139a2a2858f4161022e5cb31bc0cd74 Mon Sep 17 00:00:00 2001 From: mjanez <96422458+mjanez@users.noreply.github.com> Date: Wed, 24 Apr 2024 10:50:02 +0000 Subject: [PATCH 4/7] Improve docker compose files --- docker-compose.apache.yml | 18 +++++++----------- docker-compose.dev.yml | 19 +++++++------------ docker-compose.ghcr.yml | 18 +++++++----------- docker-compose.ghcr_apache.yml | 18 +++++++----------- docker-compose.yml | 16 +++++----------- 5 files changed, 33 insertions(+), 56 deletions(-) diff --git a/docker-compose.apache.yml b/docker-compose.apache.yml index e474adc6..24996eac 100644 --- a/docker-compose.apache.yml +++ b/docker-compose.apache.yml @@ -2,11 +2,11 @@ version: "3" volumes: ckan_storage: + ckan_logs: pg_data: solr_data: services: - apache: container_name: ${APACHE_CONTAINER_NAME} build: @@ -23,8 +23,7 @@ services: - webnet - ckannet depends_on: - ckan: - condition: service_healthy + - ckan ports: - "0.0.0.0:${APACHE_PORT_HOST}:${APACHE_PORT}" restart: on-failure:3 @@ -49,16 +48,14 @@ services: max-size: "100m" max-file: "10" depends_on: - db: - condition: service_healthy - solr: - condition: service_healthy - redis: - condition: service_healthy + - db + - solr + - redis ports: - "0.0.0.0:${CKAN_PORT_HOST}:${CKAN_PORT}" volumes: - ckan_storage:/var/lib/ckan + - ckan_logs:/var/log restart: unless-stopped healthcheck: test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:${CKAN_PORT}"] @@ -79,8 +76,7 @@ services: - webnet - ckannet depends_on: - ckan: - condition: service_healthy + - ckan ports: - "0.0.0.0:${PYCSW_PORT_HOST}:${PYCSW_PORT}" volumes: diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 0f491588..8f44d387 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -1,13 +1,12 @@ version: "3" - volumes: ckan_storage: + ckan_logs: pg_data: solr_data: services: - apache: container_name: ${APACHE_CONTAINER_NAME} build: @@ -16,8 +15,7 @@ services: env_file: - .env depends_on: - ckan-dev: - condition: service_healthy + - ckan ports: - "0.0.0.0:${APACHE_PORT_HOST}:${APACHE_PORT}" restart: on-failure:3 @@ -37,16 +35,14 @@ services: max-size: "100m" max-file: "10" depends_on: - db: - condition: service_healthy - solr: - condition: service_healthy - redis: - condition: service_healthy + - db + - solr + - redis ports: - "0.0.0.0:${CKAN_PORT_HOST}:${CKAN_PORT}" volumes: - ckan_storage:/var/lib/ckan + - ckan_logs:/var/log - ./src:/srv/app/src_extensions restart: unless-stopped healthcheck: @@ -60,8 +56,7 @@ services: env_file: - .env depends_on: - ckan-dev: - condition: service_healthy + - ckan ports: - "0.0.0.0:${PYCSW_PORT_HOST}:${PYCSW_PORT}" volumes: diff --git a/docker-compose.ghcr.yml b/docker-compose.ghcr.yml index aaae85f8..be60d7e7 100644 --- a/docker-compose.ghcr.yml +++ b/docker-compose.ghcr.yml @@ -1,8 +1,8 @@ version: "3" - volumes: ckan_storage: + ckan_logs: pg_data: solr_data: @@ -23,8 +23,7 @@ services: - webnet - ckannet depends_on: - ckan: - condition: service_healthy + - ckan ports: - "0.0.0.0:${NGINX_PORT_HOST}:${NGINX_PORT}" - "0.0.0.0:${NGINX_SSLPORT_HOST}:${NGINX_SSLPORT}" @@ -49,14 +48,12 @@ services: max-size: "100m" max-file: "10" depends_on: - db: - condition: service_healthy - solr: - condition: service_healthy - redis: - condition: service_healthy + - db + - solr + - redis volumes: - ckan_storage:/var/lib/ckan + - ckan_logs:/var/log restart: unless-stopped healthcheck: test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:${CKAN_PORT}"] @@ -77,8 +74,7 @@ services: - webnet - ckannet depends_on: - ckan: - condition: service_healthy + - ckan ports: - "0.0.0.0:${PYCSW_PORT_HOST}:${PYCSW_PORT}" volumes: diff --git a/docker-compose.ghcr_apache.yml b/docker-compose.ghcr_apache.yml index b30dbdc9..6df6cf7b 100644 --- a/docker-compose.ghcr_apache.yml +++ b/docker-compose.ghcr_apache.yml @@ -1,8 +1,8 @@ version: "3" - volumes: ckan_storage: + ckan_logs: pg_data: solr_data: @@ -23,8 +23,7 @@ services: - webnet - ckannet depends_on: - ckan: - condition: service_healthy + - ckan ports: - "0.0.0.0:${APACHE_PORT_HOST}:${APACHE_PORT}" @@ -48,14 +47,12 @@ services: max-size: "100m" max-file: "10" depends_on: - db: - condition: service_healthy - solr: - condition: service_healthy - redis: - condition: service_healthy + - db + - solr + - redis volumes: - ckan_storage:/var/lib/ckan + - ckan_logs:/var/log restart: unless-stopped healthcheck: test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:${CKAN_PORT}"] @@ -76,8 +73,7 @@ services: - webnet - ckannet depends_on: - ckan: - condition: service_healthy + - ckan ports: - "0.0.0.0:${PYCSW_PORT_HOST}:${PYCSW_PORT}" volumes: diff --git a/docker-compose.yml b/docker-compose.yml index 78e93a74..19d41d79 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,5 @@ version: "3" - volumes: ckan_storage: ckan_logs: @@ -24,8 +23,7 @@ services: - webnet - ckannet depends_on: - ckan: - condition: service_healthy + - ckan ports: - "0.0.0.0:${NGINX_PORT_HOST}:${NGINX_PORT}" - "0.0.0.0:${NGINX_SSLPORT_HOST}:${NGINX_SSLPORT}" @@ -50,12 +48,9 @@ services: max-size: "100m" max-file: "10" depends_on: - db: - condition: service_healthy - solr: - condition: service_healthy - redis: - condition: service_healthy + - db + - solr + - redis volumes: - ckan_storage:/var/lib/ckan - ckan_logs:/var/log @@ -79,8 +74,7 @@ services: - webnet - ckannet depends_on: - ckan: - condition: service_healthy + - ckan ports: - "0.0.0.0:${PYCSW_PORT_HOST}:${PYCSW_PORT}" volumes: From 8eb06e9fb5b42f55c73a3392d15036af98158a4a Mon Sep 17 00:00:00 2001 From: mjanez <96422458+mjanez@users.noreply.github.com> Date: Wed, 24 Apr 2024 11:31:12 +0000 Subject: [PATCH 5/7] Update samples Fix scheming_dcat issues --- samples/.env.apache.example | 20 ++++++++++---------- samples/.env.localhost | 20 ++++++++++---------- samples/.env.nginx.example | 20 ++++++++++---------- samples/custom/.env.es.example | 20 ++++++++++---------- 4 files changed, 40 insertions(+), 40 deletions(-) diff --git a/samples/.env.apache.example b/samples/.env.apache.example index c3ef6550..5caefdce 100644 --- a/samples/.env.apache.example +++ b/samples/.env.apache.example @@ -116,7 +116,7 @@ CKAN__LOCALE_DEFAULT="en" CKAN__LOCALE_ORDER="en es pt_BR ja it cs_CZ ca fr el sv sr sr@latin no sk fi ru de pl nl bg ko_KR hu sa sl lv" # Extensions -CKAN__PLUGINS="envvars stats text_view image_view webpage_view recline_view resourcedictionary datastore xloader harvest ckan_harvester spatial_metadata spatial_query spatial_harvest_metadata_api csw_harvester waf_harvester doc_harvester resource_proxy geo_view geojson_view wmts_view shp_view dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface scheming_dcat_datasets scheming_dcat_groups scheming_dcat_organizations scheming_dcat pdf_view pages" +CKAN__PLUGINS="envvars stats text_view image_view webpage_view recline_view resourcedictionary datastore xloader harvest ckan_harvester spatial_metadata spatial_query spatial_harvest_metadata_api csw_harvester waf_harvester doc_harvester resource_proxy geo_view geojson_view wmts_view shp_view dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface schemingdcat_datasets schemingdcat_groups schemingdcat_organizations schemingdcat pdf_view pages" # ckanext-harvest CKAN__HARVEST__MQ__TYPE=redis @@ -148,18 +148,18 @@ CKANEXT__GEOVIEW__OL_VIEWER__FORMATS="wms wfs geojson gml kml" CKANEXT__GEOVIEW__SHP_VIEWER__SRID=3857 CKANEXT__GEOVIEW__SHP_VIEWER__ENCODING=UTF-8 -# ckanext-scheming_dcat +# ckanext-schemingdcat ## CSW Endpoint for spatial metadata -CKANEXT__SCHEMING_DCAT_GEOMETADATA_BASE_URI=${PYCSW_URL} +CKANEXT__SCHEMINGDCAT_GEOMETADATA_BASE_URI=${PYCSW_URL} ## Scheming: setup_scheming.sh -CKANEXT__SCHEMING_DCAT_DATASET_SCHEMA="ckanext.scheming_dcat:schemas/geodcatap/geodcatap_dataset.yaml" -CKANEXT__SCHEMING_DCAT_GROUP_SCHEMAS="ckanext.scheming_dcat:schemas/geodcatap/geodcatap_group.json" -CKANEXT__SCHEMING_DCAT_ORGANIZATION_SCHEMAS="ckanext.scheming_dcat:schemas/geodcatap/geodcatap_org.json" -CKANEXT__SCHEMING_DCAT_PRESETS="ckanext.scheming_dcat:schemas/geodcatap/geodcatap_presets.json" +CKANEXT__SCHEMINGDCAT_DATASET_SCHEMA="ckanext.schemingdcat:schemas/geodcatap/geodcatap_dataset.yaml" +CKANEXT__SCHEMINGDCAT_GROUP_SCHEMAS="ckanext.schemingdcat:schemas/geodcatap/geodcatap_group.json" +CKANEXT__SCHEMINGDCAT_ORGANIZATION_SCHEMAS="ckanext.schemingdcat:schemas/geodcatap/geodcatap_org.json" +CKANEXT__SCHEMINGDCAT_PRESETS="ckanext.schemingdcat:schemas/geodcatap/geodcatap_presets.json" ## Facets: setup_scheming.sh -CKANEXT__SCHEMING_DCAT_FACET_LIST="theme groups theme_es dcat_type groups publisher_name publisher_type spatial_uri owner_org res_format frequency tags tag_uri conforms_to" -CKANEXT__SCHEMING_DCAT_ORGANIZATION_CUSTOM_FACETS=True -CKANEXT__SCHEMING_DCAT_GROUP_CUSTOM_FACETS=True +CKANEXT__SCHEMINGDCAT_FACET_LIST="theme groups theme_es dcat_type groups publisher_name publisher_type spatial_uri owner_org res_format frequency tags tag_uri conforms_to" +CKANEXT__SCHEMINGDCAT_ORGANIZATION_CUSTOM_FACETS=True +CKANEXT__SCHEMINGDCAT_GROUP_CUSTOM_FACETS=True # WIP: ckanext-sparql_interface CKANEXT__SPARQL__ENDPOINT_URL=https://dbpedia.org/sparql diff --git a/samples/.env.localhost b/samples/.env.localhost index a1ad2b89..232be42b 100644 --- a/samples/.env.localhost +++ b/samples/.env.localhost @@ -124,7 +124,7 @@ CKAN__LOCALE_DEFAULT="en" CKAN__LOCALE_ORDER="en es pt_BR ja it cs_CZ ca fr el sv sr sr@latin no sk fi ru de pl nl bg ko_KR hu sa sl lv" # Extensions -CKAN__PLUGINS="envvars stats text_view image_view webpage_view recline_view resourcedictionary datastore xloader harvest ckan_harvester spatial_metadata spatial_query spatial_harvest_metadata_api csw_harvester waf_harvester doc_harvester resource_proxy geo_view geojson_view wmts_view shp_view dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface scheming_dcat_datasets scheming_dcat_groups scheming_dcat_organizations scheming_dcat pdf_view pages" +CKAN__PLUGINS="envvars stats text_view image_view webpage_view recline_view resourcedictionary datastore xloader harvest ckan_harvester spatial_metadata spatial_query spatial_harvest_metadata_api csw_harvester waf_harvester doc_harvester resource_proxy geo_view geojson_view wmts_view shp_view dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface schemingdcat_datasets schemingdcat_groups schemingdcat_organizations schemingdcat pdf_view pages" # ckanext-harvest CKAN__HARVEST__MQ__TYPE=redis @@ -156,18 +156,18 @@ CKANEXT__GEOVIEW__OL_VIEWER__FORMATS="wms wfs geojson gml kml" CKANEXT__GEOVIEW__SHP_VIEWER__SRID=3857 CKANEXT__GEOVIEW__SHP_VIEWER__ENCODING=UTF-8 -# ckanext-scheming_dcat +# ckanext-schemingdcat ## CSW Endpoint for spatial metadata -CKANEXT__SCHEMING_DCAT_GEOMETADATA_BASE_URI=${PYCSW_URL} +CKANEXT__SCHEMINGDCAT_GEOMETADATA_BASE_URI=${PYCSW_URL} ## Scheming: setup_scheming.sh -CKANEXT__SCHEMING_DCAT_DATASET_SCHEMA="ckanext.scheming_dcat:schemas/geodcatap/geodcatap_dataset.yaml" -CKANEXT__SCHEMING_DCAT_GROUP_SCHEMAS="ckanext.scheming_dcat:schemas/geodcatap/geodcatap_group.json" -CKANEXT__SCHEMING_DCAT_ORGANIZATION_SCHEMAS="ckanext.scheming_dcat:schemas/geodcatap/geodcatap_org.json" -CKANEXT__SCHEMING_DCAT_PRESETS="ckanext.scheming_dcat:schemas/geodcatap/geodcatap_presets.json" +CKANEXT__SCHEMINGDCAT_DATASET_SCHEMA="ckanext.schemingdcat:schemas/geodcatap/geodcatap_dataset.yaml" +CKANEXT__SCHEMINGDCAT_GROUP_SCHEMAS="ckanext.schemingdcat:schemas/geodcatap/geodcatap_group.json" +CKANEXT__SCHEMINGDCAT_ORGANIZATION_SCHEMAS="ckanext.schemingdcat:schemas/geodcatap/geodcatap_org.json" +CKANEXT__SCHEMINGDCAT_PRESETS="ckanext.schemingdcat:schemas/geodcatap/geodcatap_presets.json" ## Facets: setup_scheming.sh -CKANEXT__SCHEMING_DCAT_FACET_LIST="theme groups theme_es dcat_type groups publisher_name publisher_type spatial_uri owner_org res_format frequency tags tag_uri conforms_to" -CKANEXT__SCHEMING_DCAT_ORGANIZATION_CUSTOM_FACETS=True -CKANEXT__SCHEMING_DCAT_GROUP_CUSTOM_FACETS=True +CKANEXT__SCHEMINGDCAT_FACET_LIST="theme groups theme_es dcat_type groups publisher_name publisher_type spatial_uri owner_org res_format frequency tags tag_uri conforms_to" +CKANEXT__SCHEMINGDCAT_ORGANIZATION_CUSTOM_FACETS=True +CKANEXT__SCHEMINGDCAT_GROUP_CUSTOM_FACETS=True # WIP: ckanext-sparql_interface CKANEXT__SPARQL__ENDPOINT_URL=https://dbpedia.org/sparql diff --git a/samples/.env.nginx.example b/samples/.env.nginx.example index 12a29357..4c2fed21 100644 --- a/samples/.env.nginx.example +++ b/samples/.env.nginx.example @@ -116,7 +116,7 @@ CKAN__LOCALE_DEFAULT="en" CKAN__LOCALE_ORDER="en es pt_BR ja it cs_CZ ca fr el sv sr sr@latin no sk fi ru de pl nl bg ko_KR hu sa sl lv" # Extensions -CKAN__PLUGINS="envvars stats text_view image_view webpage_view recline_view resourcedictionary datastore xloader harvest ckan_harvester spatial_metadata spatial_query spatial_harvest_metadata_api csw_harvester waf_harvester doc_harvester resource_proxy geo_view geojson_view wmts_view shp_view dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface scheming_dcat_datasets scheming_dcat_groups scheming_dcat_organizations scheming_dcat pdf_view pages" +CKAN__PLUGINS="envvars stats text_view image_view webpage_view recline_view resourcedictionary datastore xloader harvest ckan_harvester spatial_metadata spatial_query spatial_harvest_metadata_api csw_harvester waf_harvester doc_harvester resource_proxy geo_view geojson_view wmts_view shp_view dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface schemingdcat_datasets schemingdcat_groups schemingdcat_organizations schemingdcat pdf_view pages" # ckanext-harvest CKAN__HARVEST__MQ__TYPE=redis @@ -148,18 +148,18 @@ CKANEXT__GEOVIEW__OL_VIEWER__FORMATS="wms wfs geojson gml kml" CKANEXT__GEOVIEW__SHP_VIEWER__SRID=3857 CKANEXT__GEOVIEW__SHP_VIEWER__ENCODING=UTF-8 -# ckanext-scheming_dcat +# ckanext-schemingdcat ## CSW Endpoint for spatial metadata -CKANEXT__SCHEMING_DCAT_GEOMETADATA_BASE_URI=${PYCSW_URL} +CKANEXT__SCHEMINGDCAT_GEOMETADATA_BASE_URI=${PYCSW_URL} ## Scheming: setup_scheming.sh -CKANEXT__SCHEMING_DCAT_DATASET_SCHEMA="ckanext.scheming_dcat:schemas/geodcatap/geodcatap_dataset.yaml" -CKANEXT__SCHEMING_DCAT_GROUP_SCHEMAS="ckanext.scheming_dcat:schemas/geodcatap/geodcatap_group.json" -CKANEXT__SCHEMING_DCAT_ORGANIZATION_SCHEMAS="ckanext.scheming_dcat:schemas/geodcatap/geodcatap_org.json" -CKANEXT__SCHEMING_DCAT_PRESETS="ckanext.scheming_dcat:schemas/geodcatap/geodcatap_presets.json" +CKANEXT__SCHEMINGDCAT_DATASET_SCHEMA="ckanext.schemingdcat:schemas/geodcatap/geodcatap_dataset.yaml" +CKANEXT__SCHEMINGDCAT_GROUP_SCHEMAS="ckanext.schemingdcat:schemas/geodcatap/geodcatap_group.json" +CKANEXT__SCHEMINGDCAT_ORGANIZATION_SCHEMAS="ckanext.schemingdcat:schemas/geodcatap/geodcatap_org.json" +CKANEXT__SCHEMINGDCAT_PRESETS="ckanext.schemingdcat:schemas/geodcatap/geodcatap_presets.json" ## Facets: setup_scheming.sh -CKANEXT__SCHEMING_DCAT_FACET_LIST="theme groups theme_es dcat_type groups publisher_name publisher_type spatial_uri owner_org res_format frequency tags tag_uri conforms_to" -CKANEXT__SCHEMING_DCAT_ORGANIZATION_CUSTOM_FACETS=True -CKANEXT__SCHEMING_DCAT_GROUP_CUSTOM_FACETS=True +CKANEXT__SCHEMINGDCAT_FACET_LIST="theme groups theme_es dcat_type groups publisher_name publisher_type spatial_uri owner_org res_format frequency tags tag_uri conforms_to" +CKANEXT__SCHEMINGDCAT_ORGANIZATION_CUSTOM_FACETS=True +CKANEXT__SCHEMINGDCAT_GROUP_CUSTOM_FACETS=True # WIP: ckanext-sparql_interface CKANEXT__SPARQL__ENDPOINT_URL=https://dbpedia.org/sparql diff --git a/samples/custom/.env.es.example b/samples/custom/.env.es.example index 6fea76d3..645bc2fa 100644 --- a/samples/custom/.env.es.example +++ b/samples/custom/.env.es.example @@ -124,7 +124,7 @@ CKAN__LOCALE_DEFAULT="es" CKAN__LOCALE_ORDER="es en pt_BR ja it cs_CZ ca fr el sv sr sr@latin no sk fi ru de pl nl bg ko_KR hu sa sl lv" # Extensions -CKAN__PLUGINS="envvars stats text_view image_view webpage_view recline_view resourcedictionary datastore xloader harvest ckan_harvester spatial_metadata spatial_query spatial_harvest_metadata_api csw_harvester waf_harvester doc_harvester resource_proxy geo_view geojson_view wmts_view shp_view dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface scheming_dcat_datasets scheming_dcat_groups scheming_dcat_organizations scheming_dcat pdf_view pages" +CKAN__PLUGINS="envvars stats text_view image_view webpage_view recline_view resourcedictionary datastore xloader harvest ckan_harvester spatial_metadata spatial_query spatial_harvest_metadata_api csw_harvester waf_harvester doc_harvester resource_proxy geo_view geojson_view wmts_view shp_view dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface schemingdcat_datasets schemingdcat_groups schemingdcat_organizations schemingdcat pdf_view pages" # ckanext-harvest CKAN__HARVEST__MQ__TYPE=redis @@ -156,18 +156,18 @@ CKANEXT__GEOVIEW__OL_VIEWER__FORMATS="wms wfs geojson gml kml" CKANEXT__GEOVIEW__SHP_VIEWER__SRID=3857 CKANEXT__GEOVIEW__SHP_VIEWER__ENCODING=UTF-8 -# ckanext-scheming_dcat +# ckanext-schemingdcat ## CSW Endpoint for spatial metadata -CKANEXT__SCHEMING_DCAT_GEOMETADATA_BASE_URI=${PYCSW_URL} +CKANEXT__SCHEMINGDCAT_GEOMETADATA_BASE_URI=${PYCSW_URL} ## Scheming: setup_scheming.sh -CKANEXT__SCHEMING_DCAT_DATASET_SCHEMA="ckanext.scheming_dcat:schemas/geodcatap_es/geodcatap_es_dataset.yaml" -CKANEXT__SCHEMING_DCAT_GROUP_SCHEMAS="ckanext.scheming_dcat:schemas/geodcatap_es/geodcatap_es_group.json" -CKANEXT__SCHEMING_DCAT_ORGANIZATION_SCHEMAS="ckanext.scheming_dcat:schemas/geodcatap_es/geodcatap_es_org.json" -CKANEXT__SCHEMING_DCAT_PRESETS="ckanext.scheming_dcat:schemas/geodcatap_es/geodcatap_es_presets.json" +CKANEXT__SCHEMINGDCAT_DATASET_SCHEMA="ckanext.schemingdcat:schemas/geodcatap_es/geodcatap_es_dataset.yaml" +CKANEXT__SCHEMINGDCAT_GROUP_SCHEMAS="ckanext.schemingdcat:schemas/geodcatap_es/geodcatap_es_group.json" +CKANEXT__SCHEMINGDCAT_ORGANIZATION_SCHEMAS="ckanext.schemingdcat:schemas/geodcatap_es/geodcatap_es_org.json" +CKANEXT__SCHEMINGDCAT_PRESETS="ckanext.schemingdcat:schemas/geodcatap_es/geodcatap_es_presets.json" ## Facets: setup_scheming.sh -CKANEXT__SCHEMING_DCAT_FACET_LIST="theme groups theme_es dcat_type groups publisher_name publisher_type spatial_uri owner_org res_format frequency tags tag_uri conforms_to" -CKANEXT__SCHEMING_DCAT_ORGANIZATION_CUSTOM_FACETS=True -CKANEXT__SCHEMING_DCAT_GROUP_CUSTOM_FACETS=True +CKANEXT__SCHEMINGDCAT_FACET_LIST="theme groups theme_es dcat_type groups publisher_name publisher_type spatial_uri owner_org res_format frequency tags tag_uri conforms_to" +CKANEXT__SCHEMINGDCAT_ORGANIZATION_CUSTOM_FACETS=True +CKANEXT__SCHEMINGDCAT_GROUP_CUSTOM_FACETS=True # ckanext-pages CKANEXT__PAGES__ALOW_HTML=False From 501f2d209bac2d7b21621bff42298b68043fe95e Mon Sep 17 00:00:00 2001 From: mjanez <96422458+mjanez@users.noreply.github.com> Date: Wed, 24 Apr 2024 11:40:58 +0000 Subject: [PATCH 6/7] Fix depends_on ckan-dev --- docker-compose.dev.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 8f44d387..9bd222d5 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -15,7 +15,7 @@ services: env_file: - .env depends_on: - - ckan + - ckan-dev ports: - "0.0.0.0:${APACHE_PORT_HOST}:${APACHE_PORT}" restart: on-failure:3 @@ -56,7 +56,7 @@ services: env_file: - .env depends_on: - - ckan + - ckan-dev ports: - "0.0.0.0:${PYCSW_PORT_HOST}:${PYCSW_PORT}" volumes: From 6642a75ae94fbdd5b53d6e007f2b9953ac0af42d Mon Sep 17 00:00:00 2001 From: mnjnz <96422458+mjanez@users.noreply.github.com> Date: Sat, 27 Apr 2024 17:56:25 +0200 Subject: [PATCH 7/7] Update docker-compose files and remove unnecessary container names - Add volumes for installed files for faster startup - Improve README - Remove recline and add datatables_view --- .env.example | 13 +-- README.md | 46 +++++++--- docker-compose.apache.yml | 9 +- docker-compose.dev.yml | 10 +-- docker-compose.ghcr.yml | 9 +- docker-compose.ghcr_apache.yml | 155 --------------------------------- docker-compose.yml | 23 +---- 7 files changed, 44 insertions(+), 221 deletions(-) delete mode 100644 docker-compose.ghcr_apache.yml diff --git a/.env.example b/.env.example index b1159f93..31190393 100644 --- a/.env.example +++ b/.env.example @@ -1,16 +1,5 @@ -# Base APP_DIR=/srv/app -# Container names -NGINX_CONTAINER_NAME=nginx -REDIS_CONTAINER_NAME=redis -POSTGRESQL_CONTAINER_NAME=db -SOLR_CONTAINER_NAME=solr -CKAN_CONTAINER_NAME=ckan -WORKER_CONTAINER_NAME=ckan-worker -APACHE_CONTAINER_NAME=apache -PYCSW_CONTAINER_NAME=pycsw - # Host Ports CKAN_PORT_HOST=5000 NGINX_PORT_HOST=81 @@ -134,7 +123,7 @@ CKAN__LOCALE_ORDER="en es pt_BR ja it cs_CZ ca fr el sv sr sr@latin no sk fi ru CKAN__LOCALES_OFFERED="en es pt_BR ja it cs_CZ ca fr el sv sr sr@latin no sk fi ru de pl nl bg ko_KR hu sa sl lv" # Extensions -CKAN__PLUGINS="envvars stats text_view image_view webpage_view recline_view resourcedictionary datastore xloader harvest spatial_metadata spatial_query spatial_harvest_metadata_api csw_harvester waf_harvester doc_harvester resource_proxy geo_view geojson_view wmts_view shp_view dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface schemingdcat_datasets schemingdcat_groups schemingdcat_organizations schemingdcat schemingdcat_ckan_harvester schemingdcat_xls_harvester pdf_view pages fluent" +CKAN__PLUGINS="envvars stats image_view text_view datatables_view webpage_view resourcedictionary datastore xloader harvest spatial_metadata spatial_query spatial_harvest_metadata_api csw_harvester waf_harvester doc_harvester resource_proxy geo_view geojson_view wmts_view shp_view dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface schemingdcat_datasets schemingdcat_groups schemingdcat_organizations schemingdcat schemingdcat_ckan_harvester schemingdcat_xls_harvester pdf_view pages fluent" # ckanext-harvest CKAN__HARVEST__MQ__TYPE=redis diff --git a/README.md b/README.md index 3a0e3d04..41a3ec5c 100644 --- a/README.md +++ b/README.md @@ -203,7 +203,7 @@ To start the containers: docker compose -f docker-compose.dev.yml up -See [CKAN Images](#ckan-images) for more details of what happens when using development mode. +See [CKAN images](#5-ckan-images) for more details of what happens when using development mode. #### 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: @@ -215,15 +215,19 @@ You can use the ckan [extension](https://docs.ckan.org/en/latest/extensions/tuto 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 +#### 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 +``` and update the site URL setting: +``` CKAN_SITE_URL=https://localhost:5000 +``` After recreating the `ckan-dev` container, you should be able to access CKAN at https://localhost:5000 @@ -330,30 +334,52 @@ ckan ## ckan-docker addons ### Debugging -#### VSCode dev containers +#### Debugging CKAN Development Instance with VSCode Dev Containers and debugpy + The [Visual Studio Code Dev Containers](https://code.visualstudio.com/docs/devcontainers/containers) extension is a powerful tool that enables developers to use a container as a complete development environment. With this extension, developers can open any folder inside a container and take advantage of the full range of features provided by Visual Studio Code. To do this, developers create a `devcontainer.json `file in their project that specifies how to access or create a development container with a predefined tool and runtime stack. This allows developers to work in an isolated environment, ensuring that the development environment is consistent across team members and that project dependencies are easy to manage. ![Developing inside a Container](https://code.visualstudio.com/assets/docs/devcontainers/containers/architecture-containers.png) +To set this up: + 1. Install [VSCode](https://code.visualstudio.com/). -1. Install the[ Remote Development extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack) for VSCode. +2. Install the [Remote Development extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack) for VSCode. + +3. In your project directory, create a `devcontainer.json` file. This file will contain the configuration for your development container. -3. In your project directory, create a file named `devcontainer.json.` This file will contain the configuration for your `dev container`. +4. In the `devcontainer.json` file, specify the Docker image for your development container and any additional configuration settings, such as environment variables, ports to expose, and startup commands. -4. In the `devcontainer.json` file, specify the Docker image that you want to use for your `dev container`. +5. Enable `debugpy` for your development instance in your `.env` file: -5. Specify any additional configuration settings for your `dev container`, such as environment variables, ports to expose, and startup commands. + ```ini + USE_DEBUGPY_FOR_DEV=true + ``` + +6. Start the containers in [development mode](#development-mode) and launch VS Code. + +7. Install the "Dev Container" extension: press `CTRL+SHIFT+X`, type "dev container", click "install". + +8. Click the `Open a Remote Window` button in the bottom-left of the VS Code window. -6. Open your project in a `dev container` by using the Remote Development extension in VSCode. You can do this by clicking the `Open Folder in Container` button in the command palette or by opening the folder using the `Remote-Containers: Open Folder in Container` command. Also you can attach to an active container `Attach to Running Container`. +9. Click `Attach to Running Container...` and select your ckan-dev container, e.g. `ckan-docker-ckan-dev-1`. -7. VSCode will start a new container based on the configuration settings in your `devcontainer.json` file. Once the container is started, you can work on your project just like you would on your local machine. +10. Click the `Run and Debug` icon on the left panel then `create a launch.json`, select `Python Debugger`, `Remote Attach`, host `localhost` and port `5678`. +11. Press `F5` or click the `Run` menu and `Start Debugging`. + +You can now set breakpoints and remote debug your CKAN development instance using VSCode Dev Containers and debugpy. #### pdb Add these lines to the `ckan-dev` service in the docker compose.dev.yml file -![pdb](https://user-images.githubusercontent.com/54408245/179964232-9e98a451-5fe9-4842-ba9b-751bcc627730.png) +```yaml +ports: + - "0.0.0.0:${CKAN_PORT}:5000" + +stdin_open: true +tty: true +``` Debug with pdb (example) - Interact with `docker attach $(docker container ls -qf name=ckan)` diff --git a/docker-compose.apache.yml b/docker-compose.apache.yml index 24996eac..e76f817d 100644 --- a/docker-compose.apache.yml +++ b/docker-compose.apache.yml @@ -1,5 +1,3 @@ -version: "3" - volumes: ckan_storage: ckan_logs: @@ -8,7 +6,6 @@ volumes: services: apache: - container_name: ${APACHE_CONTAINER_NAME} build: context: apache/ dockerfile: Dockerfile @@ -29,7 +26,6 @@ services: restart: on-failure:3 ckan: - container_name: ${CKAN_CONTAINER_NAME} build: context: ckan/ dockerfile: Dockerfile @@ -56,12 +52,12 @@ services: volumes: - ckan_storage:/var/lib/ckan - ckan_logs:/var/log + - /usr/lib/python3.9/site-packages restart: unless-stopped healthcheck: test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:${CKAN_PORT}"] pycsw: - container_name: ${PYCSW_CONTAINER_NAME} build: context: ckan-pycsw/ dockerfile: Dockerfile @@ -87,7 +83,6 @@ services: test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:${PYCSW_PORT}"] db: - container_name: ${POSTGRESQL_CONTAINER_NAME} build: context: postgresql/ networks: @@ -114,7 +109,6 @@ services: test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER}", "-d", "${POSTGRES_DB}"] solr: - container_name: ${SOLR_CONTAINER_NAME} build: context: solr/ dockerfile: Dockerfile.spatial @@ -134,7 +128,6 @@ services: test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:${SOLR_PORT}/solr/"] redis: - container_name: ${REDIS_CONTAINER_NAME} image: redis:${REDIS_VERSION} logging: driver: "json-file" diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 9bd222d5..6d8681a2 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -1,5 +1,3 @@ -version: "3" - volumes: ckan_storage: ckan_logs: @@ -8,7 +6,6 @@ volumes: services: apache: - container_name: ${APACHE_CONTAINER_NAME} build: context: apache/ dockerfile: Dockerfile @@ -21,7 +18,6 @@ services: restart: on-failure:3 ckan-dev: - container_name: ${CKAN_CONTAINER_NAME} build: context: ckan/ dockerfile: Dockerfile.dev @@ -44,12 +40,13 @@ services: - ckan_storage:/var/lib/ckan - ckan_logs:/var/log - ./src:/srv/app/src_extensions + - /usr/lib/python3.9/site-packages + - /root/.vscode-server restart: unless-stopped healthcheck: test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:${CKAN_PORT}"] pycsw: - container_name: ${PYCSW_CONTAINER_NAME} build: context: ckan-pycsw/ dockerfile: Dockerfile @@ -67,7 +64,6 @@ services: test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:${PYCSW_PORT}"] db: - container_name: ${POSTGRESQL_CONTAINER_NAME} build: context: postgresql/ environment: @@ -87,7 +83,6 @@ services: test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER}", "-d", "${POSTGRES_DB}"] solr: - container_name: ${SOLR_CONTAINER_NAME} build: context: solr/ dockerfile: Dockerfile.spatial @@ -105,7 +100,6 @@ services: test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:${SOLR_PORT}/solr/"] redis: - container_name: ${REDIS_CONTAINER_NAME} image: redis:${REDIS_VERSION} logging: driver: "json-file" diff --git a/docker-compose.ghcr.yml b/docker-compose.ghcr.yml index be60d7e7..d81a4ab0 100644 --- a/docker-compose.ghcr.yml +++ b/docker-compose.ghcr.yml @@ -1,5 +1,3 @@ -version: "3" - volumes: ckan_storage: ckan_logs: @@ -8,7 +6,6 @@ volumes: services: nginx: - container_name: ${NGINX_CONTAINER_NAME} build: context: nginx/ dockerfile: Dockerfile @@ -29,7 +26,6 @@ services: - "0.0.0.0:${NGINX_SSLPORT_HOST}:${NGINX_SSLPORT}" ckan: - container_name: ${CKAN_CONTAINER_NAME} build: context: ckan/ dockerfile: Dockerfile.ghcr @@ -54,12 +50,12 @@ services: volumes: - ckan_storage:/var/lib/ckan - ckan_logs:/var/log + - /usr/lib/python3.9/site-packages restart: unless-stopped healthcheck: test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:${CKAN_PORT}"] pycsw: - container_name: ${PYCSW_CONTAINER_NAME} build: context: ckan-pycsw/ dockerfile: Dockerfile @@ -85,7 +81,6 @@ services: test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:${PYCSW_PORT}"] db: - container_name: ${POSTGRESQL_CONTAINER_NAME} build: context: postgresql/ networks: @@ -112,7 +107,6 @@ services: test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER}", "-d", "${POSTGRES_DB}"] solr: - container_name: ${SOLR_CONTAINER_NAME} build: context: solr/ dockerfile: Dockerfile.spatial @@ -132,7 +126,6 @@ services: test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:${SOLR_PORT}/solr/"] redis: - container_name: ${REDIS_CONTAINER_NAME} image: redis:${REDIS_VERSION} logging: driver: "json-file" diff --git a/docker-compose.ghcr_apache.yml b/docker-compose.ghcr_apache.yml deleted file mode 100644 index 6df6cf7b..00000000 --- a/docker-compose.ghcr_apache.yml +++ /dev/null @@ -1,155 +0,0 @@ -version: "3" - -volumes: - ckan_storage: - ckan_logs: - pg_data: - solr_data: - -services: - apache: - container_name: ${APACHE_CONTAINER_NAME} - build: - context: apache/ - dockerfile: Dockerfile - env_file: - - .env - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - webnet - - ckannet - depends_on: - - ckan - ports: - - "0.0.0.0:${APACHE_PORT_HOST}:${APACHE_PORT}" - - ckan: - container_name: ${CKAN_CONTAINER_NAME} - build: - context: ckan/ - dockerfile: Dockerfile.ghcr - args: - - TZ=${TZ} - networks: - - ckannet - - dbnet - - solrnet - - redisnet - env_file: - - .env - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - depends_on: - - db - - solr - - redis - volumes: - - ckan_storage:/var/lib/ckan - - ckan_logs:/var/log - restart: unless-stopped - healthcheck: - test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:${CKAN_PORT}"] - - pycsw: - container_name: ${PYCSW_CONTAINER_NAME} - build: - context: ckan-pycsw/ - dockerfile: Dockerfile - env_file: - - .env - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - webnet - - ckannet - depends_on: - - ckan - ports: - - "0.0.0.0:${PYCSW_PORT_HOST}:${PYCSW_PORT}" - volumes: - - ./log:${APP_DIR}/log - - ./metadata:${APP_DIR}/metadata - restart: on-failure:3 - healthcheck: - test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:${PYCSW_PORT}"] - - db: - container_name: ${POSTGRESQL_CONTAINER_NAME} - build: - context: postgresql/ - networks: - - dbnet - environment: - - POSTGRES_USER - - POSTGRES_PASSWORD - - POSTGRES_DB - - CKAN_DB_USER - - CKAN_DB_PASSWORD - - CKAN_DB - - DATASTORE_READONLY_USER - - DATASTORE_READONLY_PASSWORD - - DATASTORE_DB - volumes: - - pg_data:/var/lib/postgresql/data - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - restart: unless-stopped - healthcheck: - test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER}", "-d", "${POSTGRES_DB}"] - - solr: - container_name: ${SOLR_CONTAINER_NAME} - build: - context: solr/ - dockerfile: Dockerfile.spatial - networks: - - solrnet - env_file: - - .env - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - volumes: - - solr_data:/var/solr - restart: unless-stopped - healthcheck: - test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:${SOLR_PORT}/solr/"] - - redis: - container_name: ${REDIS_CONTAINER_NAME} - image: redis:${REDIS_VERSION} - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - networks: - - redisnet - restart: unless-stopped - healthcheck: - test: ["CMD", "redis-cli", "-e", "QUIT"] - -networks: - webnet: - ckannet: - solrnet: - internal: true - dbnet: - internal: true - redisnet: - internal: true diff --git a/docker-compose.yml b/docker-compose.yml index 19d41d79..df6affbd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3" - volumes: ckan_storage: ckan_logs: @@ -8,7 +6,6 @@ volumes: services: nginx: - container_name: ${NGINX_CONTAINER_NAME} build: context: nginx/ dockerfile: Dockerfile @@ -29,7 +26,6 @@ services: - "0.0.0.0:${NGINX_SSLPORT_HOST}:${NGINX_SSLPORT}" ckan: - container_name: ${CKAN_CONTAINER_NAME} build: context: ckan/ dockerfile: Dockerfile @@ -54,12 +50,12 @@ services: volumes: - ckan_storage:/var/lib/ckan - ckan_logs:/var/log + - /usr/lib/python3.9/site-packages restart: unless-stopped healthcheck: test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:${CKAN_PORT}"] pycsw: - container_name: ${PYCSW_CONTAINER_NAME} build: context: ckan-pycsw/ dockerfile: Dockerfile @@ -70,22 +66,11 @@ services: options: max-size: "100m" max-file: "10" - networks: - - webnet - - ckannet - depends_on: - - ckan - ports: - - "0.0.0.0:${PYCSW_PORT_HOST}:${PYCSW_PORT}" - volumes: - - ./log:${APP_DIR}/log - - ./metadata:${APP_DIR}/metadata - restart: on-failure:3 + restart: unless-stopped healthcheck: - test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:${PYCSW_PORT}"] + test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:5000"] db: - container_name: ${POSTGRESQL_CONTAINER_NAME} build: context: postgresql/ networks: @@ -112,7 +97,6 @@ services: test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER}", "-d", "${POSTGRES_DB}"] solr: - container_name: ${SOLR_CONTAINER_NAME} build: context: solr/ dockerfile: Dockerfile.spatial @@ -132,7 +116,6 @@ services: test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:${SOLR_PORT}/solr/"] redis: - container_name: ${REDIS_CONTAINER_NAME} image: redis:${REDIS_VERSION} logging: driver: "json-file"