From 5dc55f8693aff6fc23eba3b2beb89efca70ad403 Mon Sep 17 00:00:00 2001 From: Brett Date: Thu, 14 Jul 2022 11:40:02 +0200 Subject: [PATCH] More updates --- README.txt | 6 ++++++ datapusher/Dockerfile | 10 ++++++++-- datapusher/setup/requirements.txt | 7 +++++++ docker-compose.yml | 6 +++--- nginx/Dockerfile | 2 ++ 5 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 datapusher/setup/requirements.txt diff --git a/README.txt b/README.txt index e8d1121..5853a3f 100644 --- a/README.txt +++ b/README.txt @@ -28,3 +28,9 @@ Go through all the new changes in the current repo and use those for the new rep - Check out Florian's docs https://github.com/dbca-wa/ckan/blob/dbca2022/doc/maintaining/installing/install-from-docker-compose.rst - Check out Florian's repo https://github.com/dbca-wa/ckan/tree/dbca2022 - Documentation to be re-done from scratch...anything that could be useful can be mentioned here eg: local storage for ckan.ini + + +ToDo (workarounds to fix) + +1. nginx - what caching should I implement? +2. DataPusher - needed to use a custom requirements.txt (see https://github.com/ckan/datapusher/pull/251) \ No newline at end of file diff --git a/datapusher/Dockerfile b/datapusher/Dockerfile index 058ca5d..b792938 100755 --- a/datapusher/Dockerfile +++ b/datapusher/Dockerfile @@ -34,8 +34,14 @@ RUN apk add --no-cache \ 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 + python3 setup.py install + +## Need an custom version of requirements.txt (with an old release of Werkzeug) + +COPY setup/requirements.txt ${APP_DIR}/src/ + +RUN cd ${APP_DIR}/src && \ + pip3 install --no-cache-dir -r requirements.txt RUN apk del .build-deps && \ cp ${APP_DIR}/src/datapusher/deployment/*.* ${APP_DIR} && \ diff --git a/datapusher/setup/requirements.txt b/datapusher/setup/requirements.txt new file mode 100644 index 0000000..50b441a --- /dev/null +++ b/datapusher/setup/requirements.txt @@ -0,0 +1,7 @@ +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 069c8fc..3f8e757 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,9 +14,9 @@ services: build: context: nginx/ dockerfile: Dockerfile - #depends_on: - # ckan: - # condition: service_healthy + depends_on: + ckan: + condition: service_healthy ports: - "0.0.0.0:81:80" diff --git a/nginx/Dockerfile b/nginx/Dockerfile index a852b6a..6d9d37f 100644 --- a/nginx/Dockerfile +++ b/nginx/Dockerfile @@ -5,4 +5,6 @@ ENV NGINX_DIR=/etc/nginx COPY setup/index.html /usr/share/nginx/html/index.html COPY setup/*.conf ${NGINX_DIR}/conf.d/ +#RUN mkdir -p /tmp/nginx/cache + EXPOSE 81 \ No newline at end of file