Easy deployment of TheyBuyForYou tools and services into a local environment.
This process has been tested in an environment with 4 CPUs and 4GB RAM
-
Install Docker and Docker-Compose
-
Clone this repo
git clone https://github.com/TBFY/platform.git -
Download the latest TBFY data dump from Zenodo into a temporal folder (e.g
/tmp).
-
Run the platform by:
docker-compose up -d -
Wait for all services to be available (e.g.
Started Application in xx.xx seconds). The first time it may take a few minutes to download the Docker images.docker-compose logs -f -
Initialize the RDF repository
- Log into the Fuseki administration GUI, http://localhost:3030, using the
adminuser and the password that you set in thefuseki.envfile. - Create a new dataset
tbfywith the dataset typePersistent (TDB2). - Upload the NACE and OpenCorporates identifer system data files from here.
- Follow these instructions to publish the TBFY procurement data. First set the environment variable
TBFY_FUSEKI_URLto:export TBFY_FUSEKI_URL=http://localhost:3030
- Log into the Fuseki administration GUI, http://localhost:3030, using the
-
Initialize the Document repository
- Unzip the
TBFY_DATA_DUMP_JSON.zipfile from the temporal folder. The content is organized by month in different folders.unzip /tmp/TBFY_DATA_DUMP_JSON.zip - Load the tender descriptions using the
index_tenders.pypython script. Depending on the number of folders selected (e.g/tmp/*or/tmp/2020-04-*or/tmp/2020-04-30), the operation may take minutes or hours.:./script/index_tenders.py -i /tmp/2020-04-30
- Unzip the
-
That's all!
Once the platform is up and running, all TBFY services are available from a single entry point:
| service | description |
|---|---|
| /industryCodes | industry codes |
| /jurisdictions | jurisdictions |
| /ocds | OCDS instances |
| /brands | organization names |
| /triples | SPARQL Endpoint |
| /documents | tender descriptions |
| /organisation | organizations |
| /contract | contracts |
| /tender | tenders |
| /award | awards |
| /contractingProcess | contracting processes |
TBFY services are supported by the following resources:
| resource | description |
|---|---|
| http://localhost:8085 | English Topic Model |
| http://localhost:8086 | Spanish Topic Model |
| http://localhost:8087 | French Topic Model |
| http://localhost:8088 | Italian Topic Model |
| http://localhost:8089 | Portuguese Topic Model |
| http://localhost:8983 | Document Repository |
| http://localhost:8983/solr/banana | Dashboard |
| http://localhost:3040 | SPARQL Query Interface |
| http://localhost:3030 | RDF Repository |
Please take a look at our contributing guidelines if you're interested in helping!

