Fix ckan config-tool in 2.9 and pin greenlet
This commit is contained in:
parent
eb6df55058
commit
e438bb70f3
|
@ -40,9 +40,8 @@ COPY --from=extbuild /wheels /srv/app/ext_wheels
|
||||||
# Install and enable the custom extensions
|
# Install and enable the custom extensions
|
||||||
RUN pip install --no-index --find-links=/srv/app/ext_wheels ckanext-harvest && \
|
RUN pip install --no-index --find-links=/srv/app/ext_wheels ckanext-harvest && \
|
||||||
pip install --no-index --find-links=/srv/app/ext_wheels -r /srv/app/ext_wheels/harvest.txt && \
|
pip install --no-index --find-links=/srv/app/ext_wheels -r /srv/app/ext_wheels/harvest.txt && \
|
||||||
# Not working atm since ckan config tool tries to load config before executing config-tool, workaround
|
# Configure plugins
|
||||||
# ckan -c ${APP_DIR}/production.ini config-tool "ckan.plugins = ${CKAN__PLUGINS}" && \
|
ckan config-tool ${APP_DIR}/production.ini "ckan.plugins = ${CKAN__PLUGINS}" && \
|
||||||
sed -i "/ckan.plugins = envvars/c ckan.plugins = ${CKAN__PLUGINS}" ${APP_DIR}/production.ini && \
|
|
||||||
chown -R ckan:ckan /srv/app
|
chown -R ckan:ckan /srv/app
|
||||||
|
|
||||||
# Remove wheels
|
# Remove wheels
|
||||||
|
|
|
@ -55,7 +55,7 @@ COPY ./scripts/apply_ckan_patches.sh ${SRC_DIR}/apply_ckan_patches.sh
|
||||||
RUN ${SRC_DIR}/apply_ckan_patches.sh
|
RUN ${SRC_DIR}/apply_ckan_patches.sh
|
||||||
RUN rm -rf /srv/app/src/ckan/.git
|
RUN rm -rf /srv/app/src/ckan/.git
|
||||||
RUN pip wheel --wheel-dir=/wheels -r ckan/requirements.txt
|
RUN pip wheel --wheel-dir=/wheels -r ckan/requirements.txt
|
||||||
RUN pip wheel --wheel-dir=/wheels uwsgi==2.0.19.1 gevent==20.6.2
|
RUN pip wheel --wheel-dir=/wheels uwsgi==2.0.19.1 gevent==20.6.2 greenlet==0.4.16
|
||||||
|
|
||||||
|
|
||||||
###########################
|
###########################
|
||||||
|
|
|
@ -51,7 +51,7 @@ COPY ./scripts/apply_ckan_patches.sh ${SRC_DIR}/apply_ckan_patches.sh
|
||||||
RUN ${SRC_DIR}/apply_ckan_patches.sh
|
RUN ${SRC_DIR}/apply_ckan_patches.sh
|
||||||
RUN rm -rf /srv/app/src/ckan/.git
|
RUN rm -rf /srv/app/src/ckan/.git
|
||||||
RUN pip wheel --wheel-dir=/wheels -r ckan/requirements.txt
|
RUN pip wheel --wheel-dir=/wheels -r ckan/requirements.txt
|
||||||
RUN pip wheel --wheel-dir=/wheels uwsgi==2.0.19.1 gevent==20.6.2
|
RUN pip wheel --wheel-dir=/wheels uwsgi==2.0.19.1 gevent==20.6.2 greenlet==0.4.16
|
||||||
|
|
||||||
|
|
||||||
###########################
|
###########################
|
||||||
|
|
|
@ -57,7 +57,7 @@ COPY ./scripts/apply_ckan_patches.sh ${SRC_DIR}/apply_ckan_patches.sh
|
||||||
RUN ${SRC_DIR}/apply_ckan_patches.sh
|
RUN ${SRC_DIR}/apply_ckan_patches.sh
|
||||||
RUN rm -rf /srv/app/src/ckan/.git
|
RUN rm -rf /srv/app/src/ckan/.git
|
||||||
RUN pip wheel --wheel-dir=/wheels -r ckan/requirements.txt
|
RUN pip wheel --wheel-dir=/wheels -r ckan/requirements.txt
|
||||||
RUN pip wheel --wheel-dir=/wheels uwsgi==2.0.19.1 gevent==20.6.2
|
RUN pip wheel --wheel-dir=/wheels uwsgi==2.0.19.1 gevent==20.6.2 greenlet==0.4.16
|
||||||
|
|
||||||
|
|
||||||
###########################
|
###########################
|
||||||
|
@ -157,13 +157,12 @@ RUN pip install -e /srv/app/src/ckan && \
|
||||||
echo "UTC" > /etc/timezone && \
|
echo "UTC" > /etc/timezone && \
|
||||||
# Generate CKAN config
|
# Generate CKAN config
|
||||||
ckan generate config ${APP_DIR}/production.ini && \
|
ckan generate config ${APP_DIR}/production.ini && \
|
||||||
# Not working atm since ckan config tool tries to load config before executing config-tool, workaround
|
# Configure plugins
|
||||||
# ckan -c ${APP_DIR}/production.ini config-tool "ckan.plugins = ${CKAN__PLUGINS}" && \
|
ckan config-tool ${APP_DIR}/production.ini "ckan.plugins = ${CKAN__PLUGINS}" && \
|
||||||
sed -i "/ckan.plugins = stats/c ckan.plugins = ${CKAN__PLUGINS}" ${APP_DIR}/production.ini && \
|
|
||||||
# Create the data directory
|
# Create the data directory
|
||||||
mkdir ${DATA_DIR} && \
|
mkdir ${DATA_DIR} && \
|
||||||
# Webassets can't be loaded from env variables at runtime, it needs to be in the config so that it is created
|
# Webassets can't be loaded from env variables at runtime, it needs to be in the config so that it is created
|
||||||
sed -i "/ckan.webassets.path = /c ckan.webassets.path = ${DATA_DIR}/webassets" ${APP_DIR}/production.ini && \
|
ckan config-tool ${APP_DIR}/production.ini "ckan.webassets.path = ${DATA_DIR}/webassets" && \
|
||||||
# Change ownership to app user
|
# Change ownership to app user
|
||||||
chown -R ckan:ckan /srv/app
|
chown -R ckan:ckan /srv/app
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,9 @@ CHUNK_SIZE = int(os.environ.get('DATAPUSHER_CHUNK_SIZE', '16384'))
|
||||||
CHUNK_INSERT_ROWS = int(os.environ.get('DATAPUSHER_CHUNK_INSERT_ROWS', '250'))
|
CHUNK_INSERT_ROWS = int(os.environ.get('DATAPUSHER_CHUNK_INSERT_ROWS', '250'))
|
||||||
DOWNLOAD_TIMEOUT = int(os.environ.get('DATAPUSHER_DOWNLOAD_TIMEOUT', '30'))
|
DOWNLOAD_TIMEOUT = int(os.environ.get('DATAPUSHER_DOWNLOAD_TIMEOUT', '30'))
|
||||||
|
|
||||||
|
# Verify SSL
|
||||||
|
SSL_VERIFY = os.environ.get('DATAPUSHER_SSL_VERIFY', False)
|
||||||
|
|
||||||
# Rewrite resource URL's when ckan callback url base is used
|
# Rewrite resource URL's when ckan callback url base is used
|
||||||
REWRITE_RESOURCES = os.environ.get('DATAPUSHER_REWRITE_RESOURCES', False)
|
REWRITE_RESOURCES = os.environ.get('DATAPUSHER_REWRITE_RESOURCES', False)
|
||||||
REWRITE_URL = os.environ.get('DATAPUSHER_REWRITE_URL', 'http://ckan:5000/')
|
REWRITE_URL = os.environ.get('DATAPUSHER_REWRITE_URL', 'http://ckan:5000/')
|
||||||
|
|
Loading…
Reference in New Issue