This documentation will guide you on how to setup your local development environment.
Make sure that you have installed the prerequisites below:
- Python 3, at the moment we are using Python 3.9.
- pipenv, e.g. via
- NodeJS version 14.
- InvenioCLI tool (see reference)
Every time you want to run InvenioILS, you will need to:
- have the Docker services up and running
- have the InvenioILS backend development web server and celery workers running
- have the InvenioILS UI development web server running
1. Check requirements¶
To begin with, you can check if the proper requirements are installed via
invenio-cli check-requirements --development
Scaffold your InvenioILS instance. Replace
<version> with the version you want to install:
invenio-cli init ils # or: invenio-cli init ils -c v1.0.0rc1
You will be asked several questions. If in doubt, choose the default.
3. Start all dependent services using docker-compose¶
This will start PostgreSQL, Elasticsearch, RabbitMQ and Redis:
cd my-site/ docker-compose up -d
4. Build, setup and run backend part¶
# make sure that you have the right version of `setuptools` pipenv run pip install "setuptools>=57.0.0,<58.0.0" invenio-cli install pipenv run invenio setup --verbose
Run the backend server:
FLASK_ENV=development pipenv run invenio run --cert docker/backend/test.crt --key docker/backend/test.key
ui/.envfile to run on
- Running the server without specifying the certificate:
FLASK_ENV=development pipenv run invenio run
Start the celery worker. In a new terminal, make sure you are in the project folder (
my-site) then run:
pipenv run celery -A invenio_app.celery worker -l INFO
5. Install UI dependencies¶
cd my-site/ui npm install
6. Run frontend web server¶
Now visit https://127.0.0.1:3000 (accept the self-signed certificate warning if proposed). You should now see the InvenioILS website.
7. Stop it¶
When you are done, you can stop your instance and optionally destroy the containers:
To just stop the containers: