Is the InvenioILS "Preview - Documentation" Guide Docker-Compose Production Ready?

I’m just getting my bearings with the InvenioILS project, and… wow! It looks amazing. I’m having a bit of trouble getting up and running with it hosted on an Ubuntu 20.04 server. When I ran the steps described in the Preview - Documentation documentation, I did end up getting a frontend up, but it didn’t seem to be working correctly. (Note the Network Error description in the image below)

So my question is this: Is the described docker-compose file set up for “production”? Or are there other steps that need to be taken to make all the digital-plumbing connect?

Thank you! I’m so excited to get started with using this project. It looks marvelous!

Hi!
We are sorry that the documentation is at a very early stage at the moment. We had to switch to work on InvenioRDM and we could complete the documentation and improve the developer experience for InvenioILS.

The network error might be caused by a couple of things:

  1. open the network console in your browser and make sure that the backend is reachable on https://127.0.0.1:5000. Often, you need to open that URL to accept the self-signed certificate
  2. the frontend/backend vars are not configured correctly. You need to set them correctly here. You can find here how to override these defaults with env vars.

About the docker compose: this should be a pretty good starting point, but we don’t recommend running docker-compose in production. You need to make sure that you persist your data correctly.
We maintain helm charts that can be used to deploy and InvenioRDM instance, which is very similar to InvenioILS (a few differences because of the client-side web app SPA).

I hope it helps! Feel free to join the Invenio chat if you need help: Documentation — inveniosoftware.org

1 Like

Oh, this is great information! I think that this got me a lot further down the pipe! That said… I’m still running into problems.

BUT!

If Docker isn’t (at least for now) the best place to run for production. What steps should I take to spin up an instance? Maybe I can help with the documentation effort if I have the “rough outline” of installing.

Thank you, again for your guidance here! I may not yet be in the clear, but I’m getting my bearings in the project, now!

I should add to this, I got fewer errors, but still run into a 503 after some time.

Some 503 errors are still appearing. But maybe we can ignore that for now, if Docker isn’t the “right” way to deploy (or at least for now).

This should not happen :frowning: can you share here the exact commands that you are running so I can try to reproduce?

About the documentation, there is a lot to write, I would love to have the time to do it…

If you are familiar with deployment/DevOps, you can basically “copy” the docker-compose.full.yml setup.
As services, you need: Postgres (better v12+), Elasticsearch (v7), RabbitMQ, Redis.
To run InvenioAppILS, you need nginx as reverse proxy in front (to serve the React SPA app and forward the API requests to the backend with WSGI protocol) and uWSGI to run the backend.

Thank you so much! Absolutely! I’ll post the commands, my configuration, etc.

Unfortunately, this is a bit of a pet-project for me in my personal time. I may not be able to get everything to you until this weekend. But I’ll be sure to do so! Thank you for your time! :slight_smile:

Fairly new to all this so…

System: Ubuntu server: Ubuntu 22.04.4 LTS
Trying to access from an M1 Macbook pro (with different browsers

When trying to “docker-compose -f docker-compose.full.yml up” it throw an error towards the end (see screenshot). Is this error critical? Or do I need to loof for sth else?

Can’t access the frontend either: “ERR_EMPTY_RESPONSE” (tried port 5000 or 80 or 8080)

Any help would be great, no help is also fine


:slight_smile:

Hello!
I can see you have a wrong python version installed in your virtualenv. The recommended one is python 3.9, we recently upgraded all the dependencies.

thnx for the quick reply!

I have Python 3.10.12 installed (pyhton3 --version).

Not sure which one of the dependencies is giving me trouble… but I’m learning that “dependency-hell” is a thing :-S

I’m assuming you mean that the docker virtual environment has an older python version (3.6). How do I change the python version in the virtual environment?

I think the python you’ve checked the version of is your local machine’s python, while the one you are trying to run inside the container is python3.6 (visible in the logs you’ve provided). I think this causes the issues with the installation, because the “invenio-accounts” dependency does not exist for python 3.6 in the indicated version.
I quickly checked the images we are using for the docker services and I am not sure where your 3.6 is coming from as a base image (could it be your custom Dockerfile?), but the solution would be to change the base dockerfile image to the one supporting python>=3.9

Thnx a lot for your help Karolina!

I think I found the reason: the Dockerfile installed (in /invenioils/docker/backend/) had a line: “FROM: python 3.6

I changed that line to “FROM: python 3.12” and I got further.

However, I got a new error:

15.97 Collecting Flask-KVSession-Invenio>=0.6.3 (from invenio-accounts<4.0.0,>=3.0.0->invenio-app-ils==2.0.0rc4)
15.99 Downloading Flask-KVSession-Invenio-0.6.3.tar.gz (39 kB)
16.07 Preparing metadata (setup.py): started
16.11 Preparing metadata (setup.py): finished with status ‘error’
16.13 error: subprocess-exited-with-error
*16.13 *
16.13 × python setup.py egg_info did not run successfully.
16.13 │ exit code: 1
16.13 ╰─> [1 lines of output]
16.13 ERROR: Can not execute setup.py since setuptools is not available in the build environment.
16.13 [end of output]
*16.13 *
16.13 note: This error originates from a subprocess, and is likely not a problem with pip.
16.13 error: metadata-generation-failed
*16.13 *
16.13 × Encountered error while generating package metadata.
16.13 ╰─> See above for output.
*16.13 *
16.13 note: This is an issue with the package mentioned above, not pip.
16.13 hint: See above for details.

I then changed the Dockerfile again to have: “FROM: python 3.9” And then I got further again :slight_smile:

But then it errored-out on:

99.77 return subprocess.call(
99.77 File “/usr/local/lib/python3.9/subprocess.py”, line 349, in call
*99.77 with Popen(*popenargs, *kwargs) as p:
99.77 File “/usr/local/lib/python3.9/subprocess.py”, line 951, in init
99.78 self._execute_child(args, executable, preexec_fn, close_fds,
99.78 File “/usr/local/lib/python3.9/subprocess.py”, line 1837, in _execute_child
99.78 raise child_exception_type(errno_num, err_msg, err_filename)
99.78 FileNotFoundError: [Errno 2] No such file or directory: ‘npm’

From the looks of it, it didn’t find NPM and I decided to install it manually on the host machine(apt install npm).

But I’m stuck here.