From 748bf7c80db3b99d317d475394e9b8ce37a58d36 Mon Sep 17 00:00:00 2001 From: minottic Date: Mon, 27 May 2024 17:27:36 +0200 Subject: [PATCH] Fix references after file renaming --- README.md | 10 +++++----- services/backend/README.md | 7 +++++++ .../backend/services/v3/services/archivemock/README.md | 4 ++-- services/frontend/README.md | 2 +- services/mongodb/README.md | 4 ++-- services/searchapi/README.md | 2 +- 6 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 services/backend/README.md diff --git a/README.md b/README.md index 497a77a1..3777d540 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ SciCat with docker compose. By running `docker compose up -d` these steps take place: 1. a [mongodb](./services/mongodb/) container is created with some initial data. -2. the SciCat [backend v4](./services/backendv4/) container is created and connected to (1). +2. the SciCat [backend v4](./services/backend/v4/) container is created and connected to (1). 3. the SciCat [frontend](./services/frontend/) container is created and connected to (2). 4. a reverse [proxy](./services/proxy) container is created and routes traffic to (2) and (3) through localhost subdomains, in the form: `http://${service}.localhost`. The frontend is available at simply `http://localhost`. @@ -38,7 +38,7 @@ They are used when adding new services or grouping services together (and do not | Type | Env key | Value: Service/Feature | Default | Backend Compatibility | Description | Other impacted services | |---------|--------------------|---------------------------------------------------------------------------------|---------|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------| | profile | `COMPOSE_PROFILES` |
  • `analysis`: jupyter
  • `search`: searchapi
  • `'*'`: jupyter,searchapi
  • | `''` | * |
  • analysis: enables additional jupyter notebook with python SciCat SDK installed and example notebooks
  • search: enables a SciCat interface for standardised search | | -| env | `BE_VERSION` |
  • `v3`: backendv3
  • `v4`: backendv4 | `v4` | as set | Sets the be version to use in (2) of [default setup](#default-setup) to v3 | mongodb,frontend | +| env | `BE_VERSION` |
  • `v3`: backend/v3
  • `v4`: backend/v4 | `v4` | as set | Sets the be version to use in (2) of [default setup](#default-setup) to v3 | mongodb,frontend | | env | `JOBS_ENABLED` | `true`: rabbitmq,archivemock,jobs feature | `''` | v3 | Creates a rabbitmq message broker which the be posts to and the archivemock listens to. It emulates the data long-term archive/retrieve workflow | | | env | `ELASTIC_ENABLED` | `true`: elastic,elastic feature | `''` | v4 | Creates an elastic search service and sets the be to use it for full-text searches | | @@ -108,12 +108,12 @@ Make sure to check the [backend compatibility](#docker-compose-profiles-and-env- ## Add a new service -To add a new service (see the [backend v4](./services/backendv4/) for an extensive example): +To add a new service (see the [backend v4](./services/backend/v4/) for an extensive example): 1. create a dedicated folder in the [services](./services/) one 2. name it as the service 3. create the `compose.yaml` file with the required dependencies (if any) -4. eventually, include any service in (3) which is specific to the service and not shared across the global setup -5. eventually, add additional configurable logic (e.g. [BE_VERSION dependency](./services/frontend/compose.yaml#L14) and [JOBS_ENABLED dependency](./services/backendv3/compose.yaml)) +4. eventually, include any service in (2) and (3) which is specific to the service and not shared across the global setup +5. eventually, add additional configurable logic (e.g. [BE_VERSION dependency](./services/frontend/compose.yaml#L14) and [JOBS_ENABLED dependency](./services/backend/v3/compose.yaml)) 6. eventually, add the platform field, as described [here](#supported-os-architectures) 7. eventually, create a `config` folder if it requires configuration 8. eventually, add a `README.md` file in the service diff --git a/services/backend/README.md b/services/backend/README.md new file mode 100644 index 00000000..b9c21663 --- /dev/null +++ b/services/backend/README.md @@ -0,0 +1,7 @@ +# Backend service + +The SciCat backend HTTP service. + +## Dependency on `BE_VERSION` + +The `BE_VERSION` value controls which version of the backend should be started, either [v3](./services/v3) or [v4](./services/v4) (default). diff --git a/services/backend/services/v3/services/archivemock/README.md b/services/backend/services/v3/services/archivemock/README.md index face2ea1..0a51eac3 100644 --- a/services/backend/services/v3/services/archivemock/README.md +++ b/services/backend/services/v3/services/archivemock/README.md @@ -4,7 +4,7 @@ The Archive Mock simulates the interactions of an archival mock with SciCat. ## Service Requirements - [RabbitMQ](../rabbitmq/) - - [backend v3](../backendv3/) (configured to use the RabbitMQ instance above for jobs) + - [backend v3](../backend/v3/) (configured to use the RabbitMQ instance above for jobs) ## [Config](./config/.env) - Environment Variables @@ -12,4 +12,4 @@ The container uses [environment variables](https://github.com/SwissOpenEM/Scicat ## Default configuraiton -By default, it is configured to connect to the [backend v3](../backendv3/) container with the `admin` account, and to the [RabbitMQ](../rabbitmq/) container with the `guest` account. It will then handle all archival and retrieval jobs posted to RabbitMQ, and update the corresponding Datasets accordingly in Scicat. +By default, it is configured to connect to the [backend v3](../backend/v3/) container with the `admin` account, and to the [RabbitMQ](../rabbitmq/) container with the `guest` account. It will then handle all archival and retrieval jobs posted to RabbitMQ, and update the corresponding Datasets accordingly in Scicat. diff --git a/services/frontend/README.md b/services/frontend/README.md index 0f5759d9..2c394435 100644 --- a/services/frontend/README.md +++ b/services/frontend/README.md @@ -12,7 +12,7 @@ For an extensive list of available options see [here](https://scicatproject.gith ## Default configuration -In the default configuration [config](./config/), the frontend is set to call the `backend service` available at `backend.localhost` (either [v4](../backendv4/), by default, or [v3](../backendv3/) if specified otherwise by setting `BE_VERSION`). +In the default configuration [config](./config/), the frontend is set to call the `backend service` available at `backend.localhost` (either [v4](../backend/v4/), by default, or [v3](../backend/v3/) if specified otherwise by setting `BE_VERSION`). For an explanation of how setting `BE_VERSION` changes the environment creation see [here](../../README.md#docker-compose-profiles-and-env-variables-configuration-options). diff --git a/services/mongodb/README.md b/services/mongodb/README.md index 115b0642..ded6663e 100644 --- a/services/mongodb/README.md +++ b/services/mongodb/README.md @@ -14,10 +14,10 @@ These files are ingested into the database using mongo funcionalities and bypass ## Default configuration -In the default configuration [init.js](./config/init.js), the seeding creates data in the mongodb database used by the `backend` service (either [v4](../backendv4/), by default, or [v3](../backendv3/) if specified otherwise by setting `BE_VERSION`). +In the default configuration [init.js](./config/init.js), the seeding creates data in the mongodb database used by the `backend` service (either [v4](../backend/v4/), by default, or [v3](../backend/v3/) if specified otherwise by setting `BE_VERSION`). For an explanation of how setting `BE_VERSION` changes the environment creation see [here](../../README.md#docker-compose-profiles-and-env-variables-configuration-options). ## Dependency on `BE_VERSION` -Since [v3](../backendv3/) and [v4](../backendv4/) connect to two different DBs, the [BE_VERSION](./compose.yaml#L9) environment variable controls [which DB](./config/init.js#L1) should be seeded (`dacat` for [v3](../backendv3/) and `dacat-next` for [v4](../backendv4/)). +Since [v3](../backend/v3/) and [v4](../backend/v4/) connect to two different DBs, the [BE_VERSION](./compose.yaml#L9) environment variable controls [which DB](./config/init.js#L1) should be seeded (`dacat` for [v3](../backend/v3/) and `dacat-next` for [v4](../backend/v4/)). diff --git a/services/searchapi/README.md b/services/searchapi/README.md index ea9c71e6..c469f587 100644 --- a/services/searchapi/README.md +++ b/services/searchapi/README.md @@ -8,6 +8,6 @@ The searchapi configuration is set by the [.env file](./config/.env). For an ext ## Default configuration -In the default configuration [.env file](./config/.env), the searchapi is set to call the `backend service` available at `backend.localhost` (either [v4](../backendv4/), by default, or [v3](../backendv3/) if specified otherwise by setting `BE_VERSION`). +In the default configuration [.env file](./config/.env), the searchapi is set to call the `backend service` available at `backend.localhost` (either [v4](../backend/v4/), by default, or [v3](../backend/v3/) if specified otherwise by setting `BE_VERSION`). For an explanation of how setting `BE_VERSION` changes the environment creation see [here](../../README.md#docker-compose-profiles-and-env-variables-configuration-options).