Please check the prerequisites from Invenio ILS
Start all dependent services using docker-compose (this will start PostgreSQL, Elasticsearch 6, RabbitMQ and Redis):
$ docker-compose up -dNote
Make sure you have enough virtual memory for Elasticsearch in Docker:
# Linux
$ sysctl -w vm.max_map_count=262144
# macOS
$ screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty
<enter>
linut00001:~# sysctl -w vm.max_map_count=262144Next, bootstrap the instance (this will install all Python dependencies and build all static assets):
$ ./scripts/bootstrapNext, create database tables, search indexes and message queues:
$ ./scripts/setupIf the setup scripts fails because of missing vocabularies:
$ cd <your-virtualenv-path>/invenio-app-ils/invenio_app_ils
$ invenio setup --verboseInstall frontend packages:
$ cd ui
$ npm install --legacy-peer-depsIf the covers are not displayed first run the server (to start celery) and after the setup script:
$ ./scripts/server
$ ./scripts/setupStart the backend:
$ ./scripts/serverStart the frontend:
$ cd ui
$ npm startStart the celery worker (for asynchrounous tasks handling):
$ ./scripts/celeryOptional - Start a Python shell:
$ ./scripts/consoleIn order to upgrade an existing instance simply run:
$ ./scripts/updateRun the test suite via the provided script:
$ ./run-tests.shBy default, end-to-end tests are skipped. You can include the E2E tests like this:
$ env E2E=yes ./run-tests.shFor more information about end-to-end testing see pytest-invenio
You can use simulate a full production environment using the
docker-compose.full.yml. You can start it like this:
$ ./docker/build-images.sh
$ docker-compose -f docker-compose.full.yml up -d
$ ./docker/wait-for-services.sh --fullRemember to create database tables, search indexes and message queues if not already done:
$ docker-compose -f docker-compose.full.yml run --rm web-ui ./scripts/setupIn addition to the normal docker-compose.yml, this one will start:
- HAProxy (load balancer) -- https://127.0.0.1 and http://127.0.0.1:8080
- Nginx (web frontend)
- UWSGI (application container)
- Celery (background task worker)
- Flower (Celery monitoring) -- http://127.0.0.1:5555
- Kibana (Elasticsearch inspection) -- http://127.0.0.1:5601
- RabbitMQ (message queue) -- http://guest:guest@127.0.0.1:15672
On MacOS, if you have the error pg_config executable not found., then you need to install postgresql and symlink it:
$ brew install postgresql@13
$ export PATH=$PATH:/opt/homebrew/opt/postgresql\@13/binOn MacOS, if you have errors with cryptography and openssl, make sure that you have OpenSSL v3:
$ brew install openssl@3
$ LDFLAGS="-L/opt/homebrew/Cellar/openssl@3/3.1.0/lib" CPPFLAGS="-I/opt/homebrew/Cellar/openssl@3/3.1.0/include" pip install "cryptography==38.0.3"