Skip to content
Snippets Groups Projects

WIP: Resolve "upgrade backend-modules"

Closed Ulf Seltmann requested to merge 2-upgrade-backend-modules into master
+ 19
6
# Dockerfile for backend-modules
With this Dockerfile comes a shell script as `docker-entrypoint` which performs the registration and activation of modules depending on whether there exists a module-descriptor in the public folio-registry and existing okapi-installations.
This repository is is responsible for creating docker-images from the official folio-docker-images for backend-modules with a few enhancements. It eliminates the need for okapi to know of the module in advance.
simply adjust the environment variables below matching your installation parameters and start the container. a typical `docker-compose.yml` would look like this:
With this Dockerfile comes a shell script as `docker-entrypoint` which performs the registration and activation of modules depending on whether there exists a module-descriptor in the public [folio-registry] and existing okapi-installations.
Simply adjust the environment variables below matching your installation parameters and start the container. a typical `docker-compose.yml` would look like this:
```yml
mod-calendar-1.0.2:
image: folioorg/mod-calendar:1.0.2
@@ -35,8 +37,7 @@ If the module is registered successfully the JAR is started provided by the comm
* `SERVICE_ID=$MODULE-$TAG`: sets the `srvcId` used within the enable-descriptor
* `INSTALL_ID=$MODULE-$TAG`: sets the `instId` used within the enable-descriptor
* `SERVICE_URL=http://localhost:8081/`: sets the service-url where the module is reachable
* `FOLIO_REGISTRY='http://folio-registry.aws.indexdata.com/_/proxy/modules/'`: sets the registry where module-descriptors are retrieved from
* `SELF_DEPLOY=false`: enables auto-registering the module in okapi at startup (if not already registered)
* `SELF_INTRODUCE=false`: enables auto-introducing the module in okapi at startup (if not already registered). If set to `false` one has to take care of this manually.
## Modules
@@ -69,7 +70,7 @@ The images are built using the Gitlab-CI pipeline described by `.gitlab-ci.yml`.
```bash
#$ for i in $(cat modules);do
echo "rebuilding ${i}"
echo "rebuilding ${i} to $image:test"
declare org=`expr $i ':' '\([^/]\+\)'`
declare image=`expr $i ':' '[^/]\+/\([^:]\+\)'`
declare tag=`expr $i ':' '[^/]\+/[^:]\+:\(.*\)'`
@@ -82,4 +83,16 @@ The images are built using the Gitlab-CI pipeline described by `.gitlab-ci.yml`.
. >/dev/null
done
```
[folio-repository]: https://hub.docker.com/u/folioorg
\ No newline at end of file
## rebuild all folio-tools params for backend-modules
```
#$ for i in $(cat modules);do
declare image=`expr $i ':' '[^/]\+/\([^:]\+\)'`
declare tag=`expr $i ':' '[^/]\+/[^:]\+:\(.*\)'`
echo " --install-backend-module ${image}-${tag}"
done
```
[folio-repository]: https://hub.docker.com/u/folioorg
[folio-registry]: http://folio-registry.aws.indexdata.com/
\ No newline at end of file