Update compose file and remove build config
This commit is contained in:
parent
2c9427d177
commit
b6390a40e8
2
.env
2
.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
|
||||
|
|
|
@ -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"]
|
|
@ -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
|
|
@ -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"]
|
||||
|
|
Loading…
Reference in New Issue