Skip to content

Allow to optionally choose PostGIS enabled image - #38

Open
hvwaldow wants to merge 1 commit into
okfn:masterfrom
eawag-rdm:PR_integrate_postgis
Open

Allow to optionally choose PostGIS enabled image#38
hvwaldow wants to merge 1 commit into
okfn:masterfrom
eawag-rdm:PR_integrate_postgis

Conversation

@hvwaldow

Copy link
Copy Markdown
Contributor

We need PostGIS for ckanext-spatial.
Also: replaced deprecated option linkswith depends_onin docker-compose[.dev].yml

@avdata99

Copy link
Copy Markdown
Member

Postgis was removed. I agree, it's a good idea to add a easy way to add this when required.

@reinvantveer

Copy link
Copy Markdown

@hvwaldow have you had good experiences with installing the spatial extension itself? I couldn't get shapely installed on the Alpine image. It keeps complaining that it can't find the geos libraries, even if I point the environment variable GEOS_CONFIG to /usr/bin/geos-config. Would be interested in the Docker recipe for that. Haven't found anything useful on stackoverflow.

I tried:

FROM openknowledge/ckan-dev:2.8

# Set timezone
ARG TZ
RUN cp /usr/share/zoneinfo/$TZ /etc/localtime
RUN echo $TZ > /etc/timezone

RUN echo "http://mirror.leaseweb.com/alpine/edge/community" >> /etc/apk/repositories
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
RUN apk add --virtual .build-deps \
        --repository http://dl-cdn.alpinelinux.org/alpine/edge/community \
        --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \
        gcc libc-dev geos-dev geos && \
    runDeps="$(scanelf --needed --nobanner --recursive /usr/local \
    | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
    | xargs -r apk info --installed \
    | sort -u)" && \
    apk add --virtual .rundeps
RUN geos-config --cflags
RUN which geos-config
RUN GEOS_CONFIG=/usr/bin/geos-config pip install shapely

RUN 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/pip-requirements.txt

ccancellieri pushed a commit to ccancellieri/docker-ckan that referenced this pull request Aug 31, 2023
Update README to include essential information from old docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants