diff --git a/.gitlab/logo.png b/.gitlab/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..d34412dab6e6be0ae66e8c9f35f42c0a7bcf437e Binary files /dev/null and b/.gitlab/logo.png differ diff --git a/.scripts/docker-prune.sh b/.scripts/docker-prune.sh deleted file mode 100755 index c82dc1b674247df131682619e8bbf30b3d68f541..0000000000000000000000000000000000000000 --- a/.scripts/docker-prune.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -if [[ "$CI_COMMIT_BRANCH" =~ (dev|master) ]]; then - echo "pruning for branch ${CI_COMMIT_BRANCH} ..." - docker system prune -f -a --volumes -fi \ No newline at end of file diff --git a/Makefile b/Makefile index 5f39f77cc78a3c4fd1c84119d3c474cf65adf61d..79f8d5e1041aee04e0b0af36fe1097030cc62f07 100644 --- a/Makefile +++ b/Makefile @@ -28,9 +28,7 @@ build-analyse-service: bash ./dbrepo-analyse-service/build.sh build-docker: - docker build --network=host -t dbrepo-metadata-service:build --target build dbrepo-metadata-service - docker build --network=host -t dbrepo-data-service:build --target build dbrepo-data-service - docker compose build --parallel + bash ./bin/build-docker.sh build-frontend: yarn --cwd ./dbrepo-ui install --legacy-peer-deps @@ -220,7 +218,7 @@ test-clients: test: test-backend test-frontend teardown: - ./.scripts/teardown.sh + ./bin/teardown.sh docs: build-docker docker compose up -d || docker compose down diff --git a/README.md b/README.md index 4b38972edd9b06e8acf2e9d2aff3157c68caa8de..98b4d3798f9b280bdb6d9d9191751f98b1845d9b 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [](https://opensource.org/licenses/Apache-2.0) [](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/tags) -<img src="./dbrepo-ui/static/logo.png" alt="DBREPO — Repository for Data in Databases" width="200" /> + ## tl;dr @@ -14,16 +14,62 @@ with: curl -sSL https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/master/install.sh | bash ``` +## Run + +tbd + ## Documentation Find a system description, component documentation and endpoint documentation online: https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/. -## Contribute +## Development Contributions are always welcome and encouraged, please read the [contribution overview](./CONTRIBUTING.md) and contact [Prof. Andreas Rauber](http://www.ifs.tuwien.ac.at/~andi/) or [Martin Weise](https://ec.tuwien.ac.at/~weise/). +### Build + +Install the build dependencies under Debian +12 ([Instructions for Docker Engine](https://docs.docker.com/engine/install/debian/#install-using-the-repository)): + +```console +$ apt install -y bash maven openjdk-17-jdk nodejs && npm install --global yarn +$ node --version +v18.19.0 +``` + +Build the Docker containers: + +```console +./bin/build-docker.sh +``` + +### Test + +Install the [build dependencies](#build) as they also cover the test dependencies. + +Test the backend and frontend: + +```console +./bin/test.sh +``` + +## Run + +After [building the docker containers](#build) you can run them using the default `docker-compose.yml` in the root of +the sourcecode directory. This starts all services in the background (as daemons hence the `-d` flag). + +```console +$ docker compose up -d +``` + +Optionally view all logs in real-time: + +```console +$ docker compose logs -f +``` + ## Acknowledgements We want to thank the following organizations: diff --git a/bin/build-docker.sh b/bin/build-docker.sh new file mode 100644 index 0000000000000000000000000000000000000000..e58ec77e3c6f1360303f6e1162f36b9c7eb3f802 --- /dev/null +++ b/bin/build-docker.sh @@ -0,0 +1,4 @@ +#!/bin/bash +docker build -t dbrepo-metadata-service:build --target build dbrepo-metadata-service +docker build -t dbrepo-data-service:build --target build dbrepo-data-service +docker compose build --parallel \ No newline at end of file diff --git a/.scripts/teardown.sh b/bin/teardown.sh similarity index 100% rename from .scripts/teardown.sh rename to bin/teardown.sh diff --git a/bin/test.sh b/bin/test.sh new file mode 100644 index 0000000000000000000000000000000000000000..765ecaf6b7e2741a5e18d33f29071309d053de16 --- /dev/null +++ b/bin/test.sh @@ -0,0 +1,12 @@ +#!/bin/bash +mvn -f ./dbrepo-metadata-service/pom.xml clean install -DskipTests +# test java services +mvn -f ./dbrepo-metadata-service/pom.xml clean test verify +mvn -f ./dbrepo-data-service/pom.xml clean test verify +# test python services +bash ./dbrepo-analyse-service/test.sh +bash ./dbrepo-search-service/test.sh +# test ui +yarn --cwd ./dbrepo-ui install +yarn --cwd ./dbrepo-ui run test:unit +yarn --cwd ./dbrepo-ui run coverage \ No newline at end of file diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index c7dd197a44b15e5c7cca6376a7cc0287a7d60c74..0000000000000000000000000000000000000000 --- a/requirements.txt +++ /dev/null @@ -1,8 +0,0 @@ -mkdocs==1.4.3 -mkdocs-material==9.1.17 -mkdocs-with-pdf==0.9.3 -mkdocs-material-extensions>=1.0.3 -requests>=2.27.0 -py-dotenv>=0.1 -python-dotenv==1.0.0 -requests==2.31.0 \ No newline at end of file