Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ckanext-spatial spatial search #122

Merged
merged 2 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ CKAN__PREVIEW__JSON_FORMATS="json jsonld"
CKAN__PREVIEW__XML_FORMATS="xml rdf rdf+xml owl+xml atom rss turtle ttl n3 n-triples"
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

## Resource Proxy settings
### Preview size limit, default: 1MB
Expand Down Expand Up @@ -150,8 +152,8 @@ CKANEXT__DCAT__RDF_PROFILES='euro_dcat_ap_2'
# The custom endpoint **must** start with a forward slash (`/`) and contain the `{_format}` placeholder. The endpoint is added to the CKAN_SITE_URL and CKAN__ROOT_PATH, example: http://localhost:5000/catalog/catalog.rdf
CKANEXT__DCAT__DEFAULT_CATALOG_ENDPOINT='/catalog.{_format}'

# ckanext-spatial (Solr Backend - solr8-spatial)
CKANEXT__SPATIAL__SEARCH_BACKEND=solr-bbox
# ckanext-spatial (Solr Backend - solr9-spatial: https://docs.ckan.org/projects/ckanext-spatial/en/latest/spatial-search.html#choosing-a-backend-for-the-spatial-search)
CKANEXT__SPATIAL__SEARCH_BACKEND=solr-spatial-field
CKAN__SPATIAL__SRID=3857
CKANEXT__SPATIAL__COMMON_MAP__TYPE=custom
CKANEXT__SPATIAL__COMMON_MAP__CUSTOM__URL=http://a.tile.openstreetmap.org/{z}/{x}/{y}.png
Expand Down
19 changes: 13 additions & 6 deletions ckan/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
## PDFView - 0.0.8 ##
## Fluent - v1.0.1 (mjanez/Forked stable version) ##
## Scheming DCAT - v3.0.0 (mjanez/GeoDCAT-AP/NTI-RISP extended version) ##
RUN echo ${TZ} > /etc/timezone && \

Check warning on line 26 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/test-docker-pr:ckan-2.9.11

Pin versions in pip. Instead of `pip install <package>` use `pip install <package>==<version>` or `pip install --requirement <requirements file>`

Check failure on line 26 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/build-docker-push:ckan-2.9.11

DL3013 warning: Pin versions in pip. Instead of `pip install <package>` use `pip install <package>==<version>` or `pip install --requirement <requirements file>`

Check failure on line 26 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/build-docker-push:ckan-2.9.11

SC3013 warning: In POSIX sh, -ef is undefined.
if ! [ /usr/share/zoneinfo/${TZ} -ef /etc/localtime ]; then cp /usr/share/zoneinfo/${TZ} /etc/localtime; fi && \
# Remove apk cache
rm -rf /var/cache/apk/* && \
Expand Down Expand Up @@ -66,13 +66,20 @@
# Apply any patches needed to CKAN core
COPY patches patches

RUN for d in $APP_DIR/patches/*; do \

Check warning on line 69 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/test-docker-pr:ckan-2.9.11

Use WORKDIR to switch to a directory

Check warning on line 69 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/test-docker-pr:ckan-2.9.11

Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check

Check failure on line 69 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/build-docker-push:ckan-2.9.11

DL3003 warning: Use WORKDIR to switch to a directory

Check failure on line 69 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/build-docker-push:ckan-2.9.11

DL4006 warning: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check

Check failure on line 69 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/build-docker-push:ckan-2.9.11

SC2086 info: Double quote to prevent globbing and word splitting.
if [ -d $d ]; then \
for f in `ls $d/*.patch | sort -g`; do \
cd $SRC_DIR/`basename "$d"` && echo "$0: Applying patch $f to $SRC_DIR/`basename $d`" && patch -p1 < "$f"; \
done; \
fi; \
done
if [ -d $d ]; then \
for f in `ls $d/*.patch | sort -g`; do \
cd $SRC_DIR/`basename "$d"` && \
if patch -R --dry-run -p1 < "$f"; then \
echo "$0: Patch $f has already been applied or reversed, skipping..."; \
else \
echo "$0: Applying patch $f to $SRC_DIR/`basename $d`"; \
sed -i 's/\r$//' "$f" && \
patch -p1 < "$f" ; \
fi \
done ; \
fi ; \
done

# Workers
## Update start_ckan.sh with custom workers
Expand Down
1 change: 1 addition & 0 deletions ckan/Dockerfile.ghcr
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
COPY patches patches

# Updated version of the Dockerfile RUN command that skips applying a patch if a reversed or previously applied patch is detected
RUN for d in $APP_DIR/patches/*; do \

Check warning on line 27 in ckan/Dockerfile.ghcr

View workflow job for this annotation

GitHub Actions / runner/test-docker-pr:ckan-2.9.11

Use WORKDIR to switch to a directory

Check warning on line 27 in ckan/Dockerfile.ghcr

View workflow job for this annotation

GitHub Actions / runner/test-docker-pr:ckan-2.9.11

Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check
if [ -d $d ]; then \
for f in `ls $d/*.patch | sort -g`; do \
cd $SRC_DIR/`basename "$d"` && \
Expand All @@ -32,6 +32,7 @@
echo "$0: Patch $f has already been applied or reversed, skipping..."; \
else \
echo "$0: Applying patch $f to $SRC_DIR/`basename $d`"; \
sed -i 's/\r$//' "$f" && \
patch -p1 < "$f" ; \
fi \
done ; \
Expand Down
Loading