From afeff67b2fee5e09d871aca58f884b1d0267704d Mon Sep 17 00:00:00 2001 From: Jakob Voss Date: Tue, 28 May 2024 22:35:57 +0200 Subject: [PATCH] Extend Docker usage documentation --- README.md | 39 ++++++++++++++++++++------------------- docker-compose.yml | 2 +- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index c4830bcf..c74533e7 100644 --- a/README.md +++ b/README.md @@ -103,27 +103,29 @@ default. Files of each catalogue are in a subdirectory of theses base directorie ### With Docker -An Docker image bundling qa-catalogue with all of its dependencies and the web -interface [qa-catalogue-web] is made available in Docker Hub. To use -qa-catalogue via Docker first run the image in a new container (download may -take some time): +A Docker image bundling qa-catalogue with all of its dependencies and the web +interface [qa-catalogue-web] is made available: -```bash -docker compose up -d -``` +- continuously via GitHub as [`ghcr.io/pkiraly/qa-catalogue`](https://github.com/pkiraly/qa-catalogue/pkgs/container/qa-catalogue) + +- and for releases via Docker Hub as [`pkiraly/metadata-qa-marc`](https://hub.docker.com/r/pkiraly/metadata-qa-marc) + +To download, configure and start an image in a new container the file +[docker-compose.yml](docker-compose.yml) is needed in the current directory. It +can be configured with the following environment variables: + +- `IMAGE`: which Docker image to download and run. By default the latest + image from Docker Hub is used (`pkiraly/metadata-qa-marc`). Alternatives include -You can configure the container *before* running this command with the -following environment variables: + - `IMAGE=ghcr.io/pkiraly/qa-catalogue:main` for most recent image from GitHub packages + - `IMAGE=metadata-qa-marc` if you have locally [build the Docker image](#appendix-vi-build-docker-image) + +- `CONTAINER`: the name of the docker container. Default: `metadata-qa-marc`. - `INPUT`: Base directory to put your bibliographic record files in subdirectory `qa-catalogue`. Set to `./input` by default, so record files are expected to be in `input/qa-catalogue`. -- `IMAGE`: which Docker image to download and run. By default the most recent - image from Docker Hub is used. For instance if you have locally - [build the Docker image](#appendix-vi-build-docker-image), then set - `IMAGE=metadata-qa-marc`. - - `WEBCONFIG`: directory to expose configuration of [qa-catalogue-web]. Set to `./web-config` by default. If using non-default configuration for data analysis (for instance PICA instead of MARC) then you likely need to adjust configuration @@ -135,8 +137,6 @@ following environment variables: - `SOLRPORT`: port to expose Solr to. Default: `8983`. -- `CONTAINER`: the name of the docker container. Default: `metadata-qa-marc`. - Environment variables can be set on command line or be put in local file `.env`, e.g.: ```bash @@ -144,9 +144,10 @@ WEBPORT=9000 docker compose up -d ``` When the application has been started this way, run analyses with script -`./docker/qa-catalogue` the same ways as script `./qa-catalogue` is called when -not using Docker (see [usage](#usage) for details). The following example uses -parameters for Gent university library catalogue: +[`./docker/qa-catalogue`](docker/qa-catalogue) the same ways as script +`./qa-catalogue` is called when not using Docker (see [usage](#usage) for +details). The following example uses parameters for Gent university library +catalogue: ```bash ./docker/qa-catalogue \ diff --git a/docker-compose.yml b/docker-compose.yml index 4d878607..b41640f4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,7 @@ version: '2' services: app: - image: ${IMAGE:-pkiraly/metadata-qa-marc:0.7.0} + image: ${IMAGE:-pkiraly/metadata-qa-marc} volumes: - ./${INPUT:-input}:/opt/qa-catalogue/marc - ./${WEBBCONFIG:-web-config}:/var/www/html/qa-catalogue/config