Files for running SciCat with docker-compose. This code was cloned from the orginial repo. We limit the modules to the V4 backend, the mongodb, the mongo express and soon the oai-pmh interface.
- Clone the repository
git clone https://github.com/PatrickFuhrmann-HTWBerlin/scicatlive-mini.git
- Run with the following command inside the directory
docker-compose up -d
Other than the original scicatlive from Carlo, this version only does the following:
By running docker-compose up -d
these steps take place:
- a mongodb** container is created with some intial data.
- a mongo express** is created connecting to the mongodb module.
- the SciCat backend v4* container is created and connected to (1).
- a reverse proxy container is created and routes traffic to (2) and (3) through localhost subdomains, in the form:
http://${service}.localhost
(for the ones of need). The frontend is available at simplyhttp://localhost
.
Here below we show the dependencies (if B
depends on A
, then we visualize as A --> B
):
graph TD
subgraph services
mongodb[mongodb**] --> backend
mongodb[mongodb**] --> express
end
proxy -.- backend
proxy -.- express
This is in case the oai-pmh service is added.
graph TD
subgraph services
mongodb[mongodb**] --> backend
mongodb[mongodb**] --> express
mongodb[mongodb**] --> oai-pmh
end
proxy -.- backend
proxy -.- express
proxy -.- oai-pmh
We flag with *
the services which have extra internal dependencies, which are not shared across the two backend versions, and with **
the ones which have an explicit dependency on the BE_VERSION
value. To view them, refer to the service README.
The user can selectively decide the containers to spin up and the dependencies will be resolved accordingly. The available services are in the services folder and called consistently.
For example, one could decide to only run the backend
by running (be aware that this will not run the proxy
, so the service will not be available at backend.localhost
):
docker-compose up -d backend
(or a list of services, for example, with the proxy docker-compose up -d backend proxy
)
This will run, from the previous section, (1) and (2) but skip the rest.
Accordingly,
docker-compose up -d frontend
Will run, from the previous section, (1), (2) and (3) but skip (4) and (5).
And
docker-compose up -d searchapi
Will run, from the previous section, (1), (2) and (4) but skip (3) and (5).
Every service folder (inside the services parent directory) contains its configuration and some instructions, at least for the non third-party containers.
For example, to configure the frontend, the user can change any file in the frontend config folder, for which instructions are available in the README file.
After any configuration change, docker-compose up -d
must be rerun, to allow loading the changes.
To add a new service (see the backend v4 for an extensive example):
- create a dedicated folder in the services one
- name it as the service
- create the
docker-compose.yaml
file with the required dependencies (if any) - eventually include any service in (3) which is specific to the service and not shared across the global setup
- eventually add the condition on the backend version (e.g. here)
- eventually create a
config
folder if it requires configuration - eventually add a
README.md
file in the service - include the reference to (3) to the global docker-compose include list
- eventually update the main README.md
To use SciCat, please refer to the original documentation