added all new content authored by Paul's avatar Paul
# Deployment
## Docker Images
The system uses seven Docker images. Four of these are external, third-party images, and the remaining three are compiled from the sources in the project.
| Image name | Version Tag | Dockerfile |
| -------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------- |
| app | latest | https://gitlab.ruhr-uni-bochum.de/researchdata/rdms/-/blob/master/hyrax/Dockerfile |
| web | latest | https://gitlab.ruhr-uni-bochum.de/researchdata/rdms/-/blob/master/hyrax/Dockerfile |
| workers | latest | https://gitlab.ruhr-uni-bochum.de/researchdata/rdms/-/blob/master/hyrax/Dockerfile |
| solr | 8 | https://github.com/apache/solr-docker/blob/989825ee6dce2f6bf7b31051f1ba053b6c4426f2/8.11/Dockerfile |
| redis | 6 | https://github.com/docker-library/redis/blob/47ff5548471e77c54c801a06adb85aba6446bc33/6.2/Dockerfile |
| postgres | 13-alpine | https://github.com/docker-library/postgres/blob/25b3034e9b0155c3e71acaf650243e7d12a571c1/13/alpine/Dockerfile |
| ghcr.io/samvera/fcrepo4 | 4.7 | https://github.com/samvera-labs/docker-fcrepo/blob/main/Dockerfile
*(The version of the three images built by the project - `app`, `web`, `workers` are tagged "latest" because they are built from source during deployment)*
## Volumes
| Volume | Containers attached |
| ------------- | ------------------------------------ |
| app | app\<br/\> web\<br/\> workers\<br/\> |
| cache | web\<br/\> workers\<br/\> |
| db | appdb |
| db-fcrepo | fcrepodb |
| derivatives | web\<br/\> workers\<br/\> |
| fcrepo | fcrepo |
| file\_uploads | web\<br/\> workers\<br/\> |
| redis | redis |
| solr | solr |
## Containers
The images are used to create the following nine containers. Depending on your setup, the names may be slightly different - for example Docker may add a numerical suffix to each so `db` is called `db-1`.
| Container | Image Used | Volumes Attached | Ports (all TCP) | Function/service |
| --------- | -------------------------- | ---------------------------------------------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| app | app | app | | This container is not running continuously but can be started temporarily to execute commands against the application. It is also used at deployment time to set up the `web` and `worker` containers |
| appdb | postgres | db | 5432 | Postgres database for Hyrax |
| db | postgres | randomly named temporary volume | | This is a temporary container, used at build-time to support the deployment of `fcrepodb` and `appdb` |
| fcrepo | ghcr.io/samvera/fcrepo4 | fcrepo | 8080 | Fedora, an RDF document store |
| fcrepodb | postgres | db-fcrepo | 5432 | Postgres database for Fedora |
| redis | redis | redis | 6379 | Redis, manages a queue of background processes ('jobs') |
| solr | solr | solr | 8983 | Solr, an index & search server |
| web | web | app\<br/\> cache\<br/\> derivatives\<br/\> file\_uploads\<br/\> | 3000 | Hyrax - the main Ruby on Rails application |
| workers | workers | app\<br/\> cache\<br/\> derivatives\<br/\> file\_uploads\<br/\> | | Sidekiq - Ruby asynchronous process orchestration relying on Redis for queue management |