Skip to content

Deployment Overview

Katalogue is a self-hosted application and has been deployed in production scenarios in Azure and in Redhat OpenShift. This page is a high-level blueprint and deployment checklist, there will probably be many organization-specific details to adhere to from case to case.

See more detailed examples for the following deployment scenarios:

This section covers the minimum config parameters required to get the Katalogue spa and api services to start properly. You might have to set others for your specific deployment.

See the Configuration Overview on how to set the config parameters and Config Parameter Reference for a description and complete list of all available parameters.

These are the minimum parameters that need attention for the api backend service to start:

  • PORT - Port the backend api process binds to. Defaults to 8888. Behind a reverse proxy or a container port mapping this is the internal port, not the one clients use.
  • API_ENDPOINT_BASE_URL - Full public URL of the backend API app, without a path, e.g. https://katalogue-demo-api.azurewebsites.net. This is the public identity of the API — it is used as the issuer of the access- and refresh tokens — and must match what clients use to reach it. It is deliberately not derived from PORT in a production deployment.
  • COOKIE_SAME_SITE - Set to string None if backend API app and frontend app are hosted on different servers. Otherwise boolean true.
  • COOKIE_SECURE - Set to boolean true if backend API app and frontend app are hosted on different servers. Otherwise boolean false.
  • CORS_ORIGIN - Array with URLs that are allowed to send requests to the API. Must at least containt the frontend app URL, e.g. https://katalogue-demo.azurewebsites.net
  • ENCRYPTION_KEY secret - Should be a long, random string that you keep safe. This is used to hash and encrypt passwords (local user account passwords and datasource connection passwords) in the Katalogue repository database. Currently, Katalogue does not support key rotation, meaning that this cannot be changed later if you already have encrypted data in the repository database
  • REPOSITORY_HOSTNAME - Hostname of the Katalogue PostgreSQL repository database. If this is an IP address and not a FQDN, and REPOSITORY_USE_SSL is true, the REPOSITORY_SSL_SERVERNAME is also required.
  • REPOSITORY_PORT - Port of the Katalogue PostgreSQL repository database.
  • REPOSITORY_USERNAME - Username to connect to the Katalogue PostgreSQL repository database.
  • REPOSITORY_PASSWORD secret - Password for the username to connect to the Katalogue PostgreSQL repository database.
  • REPOSITORY_USE_SSL - Set to boolean true if the PostgreSQL database is configured to only accept encrypted connections, otherwise boolean false.
  • TRUST_PROXY (only required when the api is behind a reverse proxy or load balancer; see Network Proxy Configuration)

These are the minimum parameters that need attention for the spa frontend service to start:

Here is a checklist with the most common tasks that need to be completed in order to deploy Katalogue in a production scenario.

Work through the security hardening checklist alongside it. It covers the secrets, database accounts, authentication and network exposure decisions that are far cheaper to get right while deploying than to change afterwards.

System requirements…

Initialize the repository database on your PostgreSQL server before the api service is started for the first time. See Repository Database.

TODO

TODO

Katalogue is distributed as source and built into container images by whoever deploys it, so the build pipeline is part of the deployment. These steps apply whichever CI system is used.

  1. Decide which images to build. There are two services, api and spa. The api Dockerfile has three targets: embedded (the default) runs the API, scheduler and worker in one container, while api and worker split the worker into a service of its own. Build spa either way.
  2. Build with --pull, e.g. docker build --pull --target api ./services/api. Without it the build reuses whatever base image is already cached, so a rebuild meant to pick up a Node or nginx security patch can ship the same base as last time.
  3. Tag every image with the release version, not only latest. It is what makes a running deployment identifiable and a rollback a matter of changing a tag. To also identify the exact build, pass a build reference as a build argument, e.g. docker build --build-arg BUILD_REF=v0.25.0@3dde529#42 ./services/api: the branch or tag, the short commit sha and the pipeline run number, which is the format Katalogue’s own pipelines use. It is shown in the about menu as BUILD_REF.
  4. Push to a private registry.
  5. Supply configuration when the container starts, never in the image. Anything copied into an image is readable by anyone who can pull it. See the security hardening checklist.
  6. Apply the supply chain controls: install from the committed lockfile with npm ci, keep dependency install scripts disabled, and pin any third-party pipeline actions by digest rather than by tag. See Supply Chain Security.
  7. Gate production builds so that an image intended for production can only be built from the main branch and a reviewed version tag, not from an arbitrary branch.
  8. Run the database delta scripts manually, before the new image is deployed. The pipeline does not migrate the schema, and deploying without this leaves the services running against the previous one. See the upgrade procedure.
  9. Restart the runtime after updating the image reference so that the new image is actually pulled. Some hosts keep running the old one until they are restarted.

TODO

TODO

Deployment Protocol…