Skip to content
Snippets Groups Projects

Stripes

This repository is responsible for the frontend and its modules for folio. It holds the configuration of the module-versions and the assets to style the frontend according to a tenant (UBL in this case).

Also it is intended to serve as development image in case one decides to ditch the clumsy vagrant-setup.

Along with the Dockerfile comes a shell script docker-entrypoint which modifies the user stripes to match the developers uid and gid so all files created within the container can be removed or modified by the developer without becoming root.

There are two builtin commands usable:

serve production

This command build stripes according to the configuration (see [#Advanced Configuration]) and serves it via nginx. The build is not reacting on code changes.

serve development (WIP)

This command starts stripes builtin dev-server (webpack) which reacts on code-changes by rebuilding the affected javascript. as of now there is no way to make it context-aware, so the code has always be served from the root-path of the URL, e.g. http://localhost/.

Advanced Configuration

  • NODE_ENV=production: sets the mode nodejs is using to build stripes
  • APP_USER=folio: sets the username of the user who is building stripes
  • APP_HOME=/app: sets the folder where the stripes-sources are expected
  • BASE_PATH="/": sets the basepath where stripes will be served (currently only / is supported, see https://issues.folio.org/browse/STRIPES-10)
  • OKAPI_URL=http://localhost:9130: sets the url to okapi
  • TENANT=diku: sets the tenant id
  • PORT=3000: sets the port where nginx or the dev-server will serve stripes

Images

The images are built using the Gitlab-CI pipeline described by .gitlab-ci.yml.

  • All pushes to branches except master will result in alpha-images. These images will be available from the nexus-repository via

    services.ub.uni-leipzig.de:10443/bdd_dev/folio/stripes:<branch-name>
  • All pushes to master will result in staging-images. These images will be available from the nexus-repository via

    services.ub.uni-leipzig.de:10443/bdd_dev/folio/stripes:staging
  • All tags starting with release/ will result in production-images. These images will be available from the docker-repository via

    ubleipzig/folio-stripes:<version>

*Be aware that by it is not meant the version of the stripes-component itself. It is the version of the whole stripes-composition made for this tenant.

rebuild install-modules for frontend-modules

#$ cd assets/tenant
#$ node build-module-descriptors.js
#$ for i in ModuleDescriptors/*.json; do
  grep '"id":' ${i} | sed -e 's/^\s*[^:]\+:\s*"\([^"]\+\)".*$/      --install-frontend-module \1/'
done