Closed hqman closed 3 years ago
I add this to docker file, and add pages to ckan.plugins in production.ini.
Installed this plugin successfully ,but I got this error when start ckan server ,ckan version is 2.9.
environment ckan | p.load_all() ckan | File "/usr/lib/ckan/venv/src/ckan/ckan/plugins/core.py", line 140, in load_all ckan | load(*plugins) ckan | File "/usr/lib/ckan/venv/src/ckan/ckan/plugins/core.py", line 154, in load ckan | service = _get_service(plugin) ckan | File "/usr/lib/ckan/venv/src/ckan/ckan/plugins/core.py", line 257, in _get_service ckan | raise PluginNotFoundException(plugin_name) ckan | ckan.plugins.core.PluginNotFoundException: pages
RUN pip install -e git+https://github.com/ckan/ckanext-pages.git#egg=ckanext-pages
# See CKAN docs on installation from Docker Compose on usage FROM debian:stretch MAINTAINER Open Knowledge # Install required system packages RUN apt-get -q -y update \ && DEBIAN_FRONTEND=noninteractive apt-get -q -y upgrade \ && apt-get -q -y install \ python-dev \ python-pip \ python-virtualenv \ python-wheel \ python3-dev \ python3-pip \ python3-virtualenv \ python3-wheel \ libpq-dev \ libxml2-dev \ libxslt-dev \ libgeos-dev \ libssl-dev \ libffi-dev \ postgresql-client \ build-essential \ git-core \ vim \ wget \ && apt-get -q clean \ && rm -rf /var/lib/apt/lists/* # Define environment variables ENV CKAN_HOME /usr/lib/ckan ENV CKAN_VENV $CKAN_HOME/venv ENV CKAN_CONFIG /etc/ckan ENV CKAN_STORAGE_PATH=/var/lib/ckan # Build-time variables specified by docker-compose.yml / .env ARG CKAN_SITE_URL ARG PYPI_URL=https://mirrors.aliyun.com/pypi/simple/ # Create ckan user RUN useradd -r -u 900 -m -c "ckan account" -d $CKAN_HOME -s /bin/false ckan # Setup virtual environment for CKAN RUN mkdir -p $CKAN_VENV $CKAN_CONFIG $CKAN_STORAGE_PATH && \ virtualenv $CKAN_VENV && \ ln -s $CKAN_VENV/bin/pip /usr/local/bin/ckan-pip &&\ ln -s $CKAN_VENV/bin/paster /usr/local/bin/ckan-paster &&\ ln -s $CKAN_VENV/bin/ckan /usr/local/bin/ckan # Setup CKAN ADD . $CKAN_VENV/src/ckan/ RUN ckan-pip install -U pip -i $PYPI_URL && \ ckan-pip install --upgrade --no-cache-dir -r $CKAN_VENV/src/ckan/requirement-setuptools.txt -i $PYPI_URL && \ ckan-pip install --upgrade --no-cache-dir -r $CKAN_VENV/src/ckan/requirements-py2.txt -i $PYPI_URL && \ ckan-pip install -e $CKAN_VENV/src/ckan/ -i $PYPI_URL && \ ln -s $CKAN_VENV/src/ckan/ckan/config/who.ini $CKAN_CONFIG/who.ini && \ cp -v $CKAN_VENV/src/ckan/contrib/docker/ckan-entrypoint.sh /ckan-entrypoint.sh && \ chmod +x /ckan-entrypoint.sh && \ chown -R ckan:ckan $CKAN_HOME $CKAN_VENV $CKAN_CONFIG $CKAN_STORAGE_PATH RUN pip install -e git+https://github.com/ckan/ckanext-pages.git#egg=ckanext-pages ENTRYPOINT ["/ckan-entrypoint.sh"] USER ckan EXPOSE 5000 CMD ["ckan","-c","/etc/ckan/production.ini", "run", "--host", "0.0.0.0"]
@amercader
@hqman, This error happens because the plugin was not add in plugin file in the config file ex: ckan.ini: ckan.plugins = pages Not not issues of ckanext-pages.
I add this to docker file, and add pages to ckan.plugins in production.ini.
Installed this plugin successfully ,but I got this error when start ckan server ,ckan version is 2.9.
logs
RUN pip install -e git+https://github.com/ckan/ckanext-pages.git#egg=ckanext-pages
Dockerfile
@amercader