diff --git a/docs/getting-started.md b/docs/getting-started.md index f1af07db710059f6ad4e3a534951f0dd7bb0e885..3e05d15943f035a2c49000328330ae24c4c4d308 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -45,28 +45,6 @@ We currently maintain 14 images on [Dockerhub](https://hub.docker.com/u/dbrepo). $ docker-compose up -d -[//]: # (=== ":fontawesome-brands-windows: Windows") - -[//]: # () - -[//]: # ( Download the latest [`docker-compose.yml`](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/master/docker-compose.prod.yml) ) - -[//]: # ( and [`.env`](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/master/.env.win.example) ) - -[//]: # ( ) - -[//]: # ( $ curl.exe -o docker-compose.yml https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/master/docker-compose.prod.yml) - -[//]: # ( $ curl.exe -o .env https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/master/.env.win.example) - -[//]: # () - -[//]: # ( Start the services) - -[//]: # () - -[//]: # ( $ docker-compose up -d) - === ":fontawesome-brands-apple: macOS" Download the latest [`docker-compose.yml`](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/master/docker-compose.prod.yml) @@ -115,7 +93,7 @@ We develop all packages with the following software requirements: For local development you need to clone the repository and build the services from scratch: -```console +``` $ git clone git@gitlab.phaidra.org:fair-data-austria-db-repository/fda-services.git $ make build ``` @@ -126,13 +104,13 @@ It is possible to use the Swagger documentation of the services to generate HTTP Clients can only begenerated when DBRepo is running. Just download the [`swagger-codegen-cli.jar`](https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/) and start the services: -```console +``` $ docker-compose up -d ``` Run the codegen tool: -```console +``` $ java -jar ./swagger-codegen-cli-2.x.y.jar generate -i ./api-docs.yaml -l python -o ./api-container ``` @@ -142,7 +120,7 @@ $ java -jar ./swagger-codegen-cli-2.x.y.jar generate -i ./api-docs.yaml -l pytho Start all containers with docker-compose: -```console +``` $ docker-compose up -d $ docker container stop fda-xxxxx-service # <<< replace with the service you want to debug $ docker container rm fda-xxxxx-service # <<< replace with the service you want to debug @@ -155,7 +133,7 @@ Then start the container in your IDE and debug it. Start all containers with docker-compose: -```console +``` $ docker-compose up -d $ docker container stop fda-ui && docker container rm fda-ui $ docker-compose logs -f @@ -163,6 +141,6 @@ $ docker-compose logs -f Then start the frontend in another console window: -```console +``` $ yarn --cwd=./fda-ui dev ``` diff --git a/docs/system.md b/docs/system.md index 788fef061a7f32b55a063bc2c2c5234086c5124e..31ed1104d00f7da17853f0b0957e20d9ce5a0453 100644 --- a/docs/system.md +++ b/docs/system.md @@ -53,14 +53,14 @@ metadata database. By default, a token is valid for 24 hours and is used on all For the **HTTP API**, obtaining a new token can be done via, e.g. cURL. -```console +``` $ curl -X POST -d '{"username":"username","password":"password"}' -H "Content-Type: application/json" https://dbrepo.ossdip.at/api/auth ``` Call a secured method by setting the JWT Token as [Bearer Token](https://www.rfc-editor.org/rfc/rfc6750.html) via, e.g. cURL. -```console +``` $ curl -X PUT -H "Authorization: Bearer TOKEN" -H "Content-Type: application/json" https://dbrepo.ossdip.at/api/auth ``` @@ -84,7 +84,7 @@ use [PostgreSQL](https://www.postgresql.org/) for its rich capabilities in the r The default credentials are `postgres:postgres` for the database `fda`. Connect to the database via, e.g. *psql*. -```console +``` $ psql -d fda -h localhost -p 5432 -U postgres -W ``` @@ -106,19 +106,19 @@ and registers a unit. It is used to assign a unit of measurement to a table colu For the **HTTP API**, the Unit Service assigns a unit of measurement via, e.g. cURL. First the list of concepts can be queried. -```console +``` $ curl -X POST -d '{"offset":0,"ustring":"met"}' https://dbrepo.ossdip.at/api/units/suggest ``` Then the concept needs to be saved into the metadata database. -```console +``` $ curl -X POST -d '{"name":"metre","uri":...}' https://dbrepo.ossdip.at/api/units/saveconcept ``` Then the column can be assigned to a table column. -```console +``` $ curl -X POST -d '{"cdbid":1,"tid":1,"cid":1,"uri":...}' https://dbrepo.ossdip.at/api/units/savecolumnsconcept ``` @@ -152,7 +152,7 @@ The Search Service implements ElasticSearch and creates a retrievable index on a with each save operation on databases in the metadata database. The database name can be queried with ElasticSearch to e.g. match the term "Airquality" -```console +``` $ curl http://dbrepo.ossdip.at:9200/databaseindex/_search?q=name:Airquality ```