Skip to content

Latest commit

 

History

History
73 lines (46 loc) · 2.73 KB

README_Docker.md

File metadata and controls

73 lines (46 loc) · 2.73 KB

Deployment instructions

Prerequisites

You should have installed:

Installation

All of the commands should be executed from the deploy directory.

cd deploy

Light up the database

Up the DB

docker-compose up -d db
docker-compose up -d mongo-express

With mongo-express we can see the contents of the database at http://localhost:8081.

Load the data

To load the database we execute the following commands:

mongoimport --jsonArray --uri "mongodb://vpbib:[email protected]:27017/beacon?authSource=admin" --file data/datasets*.json --collection datasets
mongoimport --jsonArray --uri "mongodb://vpbib:[email protected]:27017/beacon?authSource=admin" --file data/individuals*.json --collection individuals

This loads the JSON files inside of the data folder into the MongoDB database.

You can also use make load as a convenience alias.

Create the indexes

You can create the necessary indexes running the following Python script:

# Install the dependencies
pip3 install pymongo

python3 reindex.py

Light up the beacon

Up the beacon

Once the database is setup, you can up the beacon with the following command:

docker-compose up -d beacon

Check the logs

Check the logs until the beacon is ready to be queried:

docker-compose logs -f beacon