diff --git a/README.md b/README.md index 7086b7bfb764e8d865ec41f746c1f9f631bd997f..13d8977e2366ba0ea8d1f59e058257b187ac7b8e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ # REST API to TOAR-II database using FastAPI + +[[_TOC_]] ## documentation (pages) @@ -23,14 +25,27 @@ This repository holds a simple test database *toardb_dump.sql* (not yet fully fi Also some testing examples for the running application are provided within file *production_tests.sh*, as well as corresponding pytests. Running the tests and pytest are described after the installation guide (you need to do this first). -Please follow exactly the instructions on page +If you already have a PostGIS database server running, just load the toardb_dump (see below) +-- you still may need to install the "toar_controlled_vocabulary"-extension (also see below). + +If you need to **install a PostGIS database server**, please follow exactly the instructions on page https://gitlab.version.fz-juelich.de/toar/toar-db/-/blob/master/INSTALL_POSTGIS.md -After the above instructions execute the following command from shell: +You also need **the extension toar_controlled_vocabulary** to be installed within your database server. +How to install, is described here: https://gitlab.version.fz-juelich.de/esde/toar-data/toardb_fastapi/-/issues/3#note_51339 + +After the above instructions execute the following command from shell **to load the database dump**: ``` psql -U toaradmin -d toardb -h localhost -f toardb_dump.sql ``` +## Setting passwords for database access + +The following file holds the credentials for database access and may need some adaptions: +**toardb/utils/database.py** +To make sure, that this sensitive data is not uploaded to the remote server, use the following command to prevent git from tracking this file: +`git update-index --assume-unchanged toardb/utils/database.py` + ## Running pytest After download **and installation (see above)** of toardb_fastapi you can check, if everything is working via