Hackfix CKAN certificate verification

This commit is contained in:
Disassembler 2018-02-01 15:34:43 +01:00
parent 4451d479a2
commit 4f5571492b
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499
3 changed files with 18 additions and 1 deletions

View File

@ -31,6 +31,13 @@ RUN \
&& find /srv/ckan-datapusher/src -name '.git*' -exec rm -rf {} + \
&& rm -rf /root/.cache
COPY docker/ /
RUN \
# Hackfix the self-signed certificate verification
cd /usr/lib/python2.7/site-packages \
&& patch -p0 </srv/ckan-datapusher/ssl_verify.patch
VOLUME ["/etc/ckan-datapusher", "/srv/ckan-datapusher/data"]
EXPOSE 8004

View File

@ -0,0 +1,10 @@
--- orig/web.py
+++ ckanserviceprovider/web.py
@@ -733,6 +733,7 @@
try:
result = requests.post(
result_url,
+ verify=False,
data=json.dumps(job_dict, cls=DatetimeJsonEncoder),
headers=headers)

View File

@ -1,4 +1,4 @@
#!/bin/sh
URL=$(ip route get 1 | awk '{print $NF;exit}')
sed -i "s|^ckan\.site_url.*|ckan.site_url = http://${URL}:8003|" /srv/ckan/conf/ckan.ini
sed -i "s|^ckan\.site_url.*|ckan.site_url = https://${URL}:8403|" /srv/ckan/conf/ckan.ini