ckan / ckan-docker

Scripts and images to run CKAN using Docker Compose
104 stars 195 forks source link

failed to find libmagic #57

Open timiil opened 1 year ago

timiil commented 1 year ago

hello all, my steps is :

git clone https://github.com/ckan/ckan-docker/

cd ckan-docker

docker-compose build

docker-compose up

everything works well, but when we use https://0.0.0.0:8443 we have two problem:

1, when we upload the json file and click the 'Upload to DataStore' it failed:

Error: File "/usr/lib/python3.9/site-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, **job.kwargs) File "/usr/lib/python3.9/site-packages/datapusher-0.0.20-py3.9.egg/datapusher/jobs.py", line 433, in push_to_datastore table_set = messytables.any_tableset(tmp, mimetype=ct, extension=ct) File "/usr/lib/python3.9/site-packages/messytables/any.py", line 153, in any_tableset magic_mime = get_mime(fileobj) File "/usr/lib/python3.9/site-packages/messytables/any.py", line 62, in get_mime import magic File "/usr/lib/python3.9/site-packages/magic/__init__.py", line 209, in <module> libmagic = loader.load_lib() File "/usr/lib/python3.9/site-packages/magic/loader.py", line 49, in load_lib raise ImportError('failed to find libmagic. Check your installation') ImportError('failed to find libmagic. Check your installation') 

2, every time the page redirect is failed because it alway redirect to 'https://localhost:8443/xxxxx’ page, but not the machine ip. so where we can reconfig the 'site name' ?

kowh-ai commented 1 year ago

For 2), try changing the environment variable in the .env file as follows: CKAN_SITE_URL=https://:8443. Make sure you remove/start the CKAN container and delete the CKAN image after you make the change

kowh-ai commented 1 year ago

For 1), I'm not sure why your DataPusher container doesn't find libmagic...The image should contain this library https://github.com/ckan/ckan-docker-base/blob/main/datapusher/Dockerfile#L29