Data Repository

Based on turn-key solution

Installation

Had troubles with setting-up. Apparently, native python version should match image python version. Since no python3.9 image is available at docker, and debian 11 comes only with python3.9, of the two options downgrading of python was chosen.

Python downgrade

Follow instructions. Essentially:

sudo apt update && sudo apt upgrade
wget https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tar.xz
sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev 
     libssl-dev libsqlite3-dev libreadline-dev libffi-dev curl libbz2-dev -y
mkdir software/packages
mv Python-3.8.12.tar.xz software/packages/
mkdir software/build && cd software/build
tar xvf ../packages/Python-3.8.12.tar.xz
./configure --prefix=~/software/install/python3.8 --enable-optimizations --enable-shared
make -j 6 && make install

Setup virtualenv for invenio

sudo su invenio
mkdir -p virtualenv/p3.8
export LD_LIBRARY_PATH=~X/software/install/python3.8/lib:$LD_LIBRARY_PATH
~X/software/install/python3.8/bin/python3.8 -m venv ~/virtualenv/p3.8

Follow Invenio instructions

. ~/virtualenv/p3.8/bin/activate
pip install invenio-cli
invenio-cli init rdm -c v6.0

Correct some recently updated packages that break Invenio build

  • Add RUN pip install MarkupSafe==2.0.1 to created Dockerfile
  • Add to docker-compose.full.yml
networks: 
   default: 
      external: 
         name: docker_network

  • Add frontend to APP_ALLOWED_HOSTS in invenio.cfg
  • Remove exposed ports 80 and 443 from frontend to avoid collision with rproxy.
  • TODO: Remove exposed port 5432 of db.

Always run build and setup after changes to invenio.cfg.

Build

invenio-cli containers build
invenio-cli containers setup

Run containers

invenio-cli containers start
invenio-cli containers stop

rproxy exits if the proxied service is not available, so start rproxy after services.

Reroute static

One solution

Discussion