diff --git a/.env b/.env index 548f3f7..71a85d4 100644 --- a/.env +++ b/.env @@ -55,7 +55,7 @@ CKAN_REDIS_URL=redis://redis:6379/1 TEST_CKAN_REDIS_URL=redis://redis:6379/1 # Datapusher -DATAPUSHER_VERSION=0.0.18 +DATAPUSHER_VERSION=0.0.19 CKAN_DATAPUSHER_URL=http://datapusher:8800 CKAN__DATAPUSHER__CALLBACK_URL_BASE=http://ckan:5000 DATAPUSHER_REWRITE_RESOURCES=True diff --git a/datapusher/Dockerfile b/datapusher/Dockerfile deleted file mode 100755 index 2222f14..0000000 --- a/datapusher/Dockerfile +++ /dev/null @@ -1,54 +0,0 @@ -FROM alpine:3.13 - -ARG DATAPUSHER_VERSION -ENV APP_DIR=/srv/app -ENV GIT_BRANCH ${DATAPUSHER_VERSION} -ENV GIT_URL https://github.com/ckan/datapusher.git -ENV JOB_CONFIG ${APP_DIR}/datapusher_settings.py - -WORKDIR ${APP_DIR} - -RUN apk add --no-cache \ - python3 \ - py3-pip \ - py3-wheel \ - libffi-dev \ - libressl-dev \ - libxslt \ - uwsgi \ - uwsgi-http \ - uwsgi-corerouter \ - uwsgi-python \ - # Temporary packages to build DataPusher requirements - && apk add --no-cache --virtual .build-deps \ - gcc \ - git \ - musl-dev \ - python3-dev \ - libxml2-dev \ - libxslt-dev \ - libmagic \ - openssl-dev \ - cargo - -RUN mkdir ${APP_DIR}/src && cd ${APP_DIR}/src && \ - git clone -b ${GIT_BRANCH} --depth=1 --single-branch ${GIT_URL} && \ - cd datapusher && \ - python3 setup.py install && \ - pip3 install --no-cache-dir -r requirements.txt - -RUN apk del .build-deps && \ - cp ${APP_DIR}/src/datapusher/deployment/*.* ${APP_DIR} && \ - # Remove default values in ini file - sed -i '/http/d' ${APP_DIR}/datapusher-uwsgi.ini && \ - sed -i '/wsgi-file/d' ${APP_DIR}/datapusher-uwsgi.ini && \ - sed -i '/virtualenv/d' ${APP_DIR}/datapusher-uwsgi.ini && \ - rm -rf ${APP_DIR}/src - -# Create a local user and group to run the app -RUN addgroup -g 92 -S www-data && \ - adduser -u 92 -h /srv/app -H -D -S -G www-data www-data - -EXPOSE 8800 -CMD ["sh", "-c", \ - "uwsgi --plugins=http,python --enable-threads --http=0.0.0.0:8800 --socket=/tmp/uwsgi.sock --ini=`echo ${APP_DIR}`/datapusher-uwsgi.ini --wsgi-file=`echo ${APP_DIR}`/datapusher.wsgi"] diff --git a/datapusher/setup/requirements.txt b/datapusher/setup/requirements.txt deleted file mode 100644 index 50b441a..0000000 --- a/datapusher/setup/requirements.txt +++ /dev/null @@ -1,7 +0,0 @@ -argparse -ckanserviceprovider==1.0.0 -html5lib==1.0.1 -messytables==0.15.2 -certifi -requests[security]==2.27.1 -Werkzeug~=2.0.2 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 0dc3c08..70ede25 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -50,14 +50,7 @@ services: datapusher: container_name: ${DATAPUSHER_CONTAINER_NAME} - build: - context: datapusher/ - args: - - DATAPUSHER_VERSION=${DATAPUSHER_VERSION} - env_file: - - .env - ports: - - "8800:8800" + image: ckan/ckan-base-datapusher:${DATAPUSHER_VERSION} restart: unless-stopped healthcheck: test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:8800"]