Skip to content

Commit

Permalink
Fix references after file renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
minottic committed May 27, 2024
1 parent 4c7cba5 commit 748bf7c
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 11 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand All @@ -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` | <li>`analysis`: jupyter<li>`search`: searchapi<li>`'*'`: jupyter,searchapi</li> | `''` | * | <li>analysis: enables additional jupyter notebook with python SciCat SDK installed and example notebooks<li>search: enables a SciCat interface for standardised search | |
| env | `BE_VERSION` | <li>`v3`: backendv3<li>`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` | <li>`v3`: backend/v3<li>`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 | |

Expand Down Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions services/backend/README.md
Original file line number Diff line number Diff line change
@@ -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).
4 changes: 2 additions & 2 deletions services/backend/services/v3/services/archivemock/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ 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

The container uses [environment variables](https://github.com/SwissOpenEM/ScicatArchiveMock?tab=readme-ov-file#utility-scripts) for configuration.

## 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.
2 changes: 1 addition & 1 deletion services/frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
4 changes: 2 additions & 2 deletions services/mongodb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)).
2 changes: 1 addition & 1 deletion services/searchapi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

0 comments on commit 748bf7c

Please sign in to comment.