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:
- Azure - Production
- Redhat OpenShift - Production
- Local Development Server - Local development
- Docker Compose - Quickstart local demo deployment
Minimum Configuration
Section titled “Minimum Configuration”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.
Backend Service (api)
Section titled “Backend Service (api)”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 fromPORTin 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.netENCRYPTION_KEYsecret - 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 databaseREPOSITORY_HOSTNAME- Hostname of the Katalogue PostgreSQL repository database. If this is an IP address and not a FQDN, andREPOSITORY_USE_SSLis true, theREPOSITORY_SSL_SERVERNAMEis also required.REPOSITORY_PORT- Port of the Katalogue PostgreSQL repository database.REPOSITORY_USERNAME- Username to connect to the Katalogue PostgreSQL repository database.REPOSITORY_PASSWORDsecret - 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)
Frontend Service (spa)
Section titled “Frontend Service (spa)”These are the minimum parameters that need attention for the spa frontend service to start:
API_URL- URL to the backend api service (corresponds to<API_ENDPOINT_BASE_URL>/api, e.g. https://katalogue-demo-api.azurewebsites.net/api)PORT- Port the frontend spa service is served on. Defaults to 8080.
Deployment Checklist
Section titled “Deployment Checklist”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.
Prerequisities and Requirements
Section titled “Prerequisities and Requirements”System requirements…
Repository Database
Section titled “Repository Database”Initialize the repository database on your PostgreSQL server before the api service is started for the first time. See Repository Database.
Networking
Section titled “Networking”TODO
User Accounts & Permissions
Section titled “User Accounts & Permissions”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.
- 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, whileapiandworkersplit the worker into a service of its own. Buildspaeither way. - 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. - 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 asBUILD_REF. - Push to a private registry.
- 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.
- 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. - 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.
- 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.
- 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.
Database Backup & Restore
Section titled “Database Backup & Restore”TODO
Documentation
Section titled “Documentation”TODO
Deployment Protocol…