CI and releases
Docs for PKI Manager 3.17.0 (released 2026-11-24), from main 4d59c30 (30 commits after the release). Page changed after 3.17.0, not in a release yet.
Source:
docs/development/ci.md
How the images are built, what each GitHub Actions workflow does, and how a release is cut.
Build and run from source
Section titled “Build and run from source”The Compose file of production (docker/docker-compose.yml) can also build the images from your
checkout. Operators use the published images instead: see Docker deployment.
Run the stack from source
Section titled “Run the stack from source”-
Clone and navigate to the project:
Terminal window cd pki-manager-web/dockerThe Compose file is
docker/docker-compose.yml: run thedocker composecommands below from thedocker/directory (or add-f docker/docker-compose.ymlfrom the repository root). -
Create
.envfile (optional, uses defaults if not present):Terminal window cp .env.example .env# Edit .env with your preferred settings -
Create the backend data folder (the backend runs as uid 1001; a folder that Docker creates is owned by root and the backend fails with
SqliteError: unable to open database file):Terminal window mkdir -p ../pki && sudo chown 1001:1001 ../pki -
Build and start all services (
--buildbuilds the images from your checkout instead of pulling them):Terminal window docker compose up --build -
Access the application:
- Frontend: http://localhost:8080
- Backend API: http://localhost:3000
- KMS: not published to the host (internal
kms-internalnetwork only)
Build one image
Section titled “Build one image”Build backend only (from the repository root):
docker build -f docker/Dockerfile --target backend -t pki-manager-backend:dev .Build frontend only:
docker build -f docker/Dockerfile --target frontend \ --build-arg VITE_API_URL=http://localhost:3000/trpc \ -t pki-manager-frontend:dev .docker/Dockerfile has two final stages: backend (Node.js 22 on Alpine, with openssl and a Java
runtime for the PKCS#12 and JKS exports) and frontend (nginx).
If the build stops with TypeScript errors, fix them in the code first:
cd backend && pnpm typecheckWorkflows
Section titled “Workflows”| Workflow | File | Runs on | What it does |
|---|---|---|---|
| Test | test.yml |
push and pull request to main that touch backend/ or frontend/ |
Backend tests, type check of backend and frontend |
| Docker Build and Publish | docker-build.yml |
push to main, tags v*.*.*, pull requests |
Builds the backend and frontend images (linux/amd64), publishes them to ghcr.io, attests the build, scans with Trivy |
| SCEP | scep.yml |
changes under scep/, tags v*.*.* |
Tests the SCEP gateway and publishes its image |
| k8s-issuer | k8s-issuer.yml |
changes under k8s/issuer/, tags v*.*.* |
Tests the issuer, publishes its image, signs it with cosign, makes an SBOM |
| krl-client | krl-client.yml |
changes under krl-client/, tags v*.*.* |
Tests the KRL client; on a tag, attaches the signed binary and its SBOM to the release |
| Ansible e2e | ansible-e2e.yml |
changes to ansible/, the SSH routes and services, krl-client/ |
End-to-end test of the SSH host role in Docker |
| Security | security.yml |
push and pull request to main |
Secret scan (gitleaks) |
| Docs site | docs.yml |
changes to the documentation, the site or the backend source | Builds the site, runs the API examples against the demo stack; from main, publishes the site image (see Website deploy) |
| Release | release.yml |
tags v*.*.* |
Creates the GitHub Release from the matching CHANGELOG.md section |
Images go only to GitHub Container Registry. The image names and tags are in Docker deployment.
VITE_API_URL is a repository variable (Settings → Secrets and variables → Actions → Variables).
The frontend image is built with it; without it the default is http://localhost:3000/trpc.
Website deploy
Section titled “Website deploy”The website https://pki-manager.oriolrius.cat runs on the maintainer’s own server (k5), not on GitHub Pages. GitHub has no access to that server and holds no secret for it: it only publishes an image, and the server takes it.
- A push to
mainrunsdocs.yml. It builds the site and makes an image with it:ghcr.io/oriolrius/pki-manager-web/site, tagsmainandsha-<commit>(public). The image is nginx without root (site/Dockerfile,site/server/nginx.conf). It answers/healthzand sends the headerX-Site-Revision: <commit>on every response. - Every 5 minutes, a Gitea Actions workflow on the server reads the digest of the tag
main(repositoryk5-stack-pki-site, not public). When the digest is new, it writes it into the Compose file of the stack, commits it, and deploys the stack with Dockhand. - It checks that
https://pki-manager.oriolrius.cat/healthzsends the new commit and that the main pages answer200. If a check fails, it puts back the previous digest and deploys it again.
So a change on main is live in about 10 minutes (build, then the next poll). The Compose file
always names an image by digest, and its git history is the list of deploys.
To publish a test image from another branch, run Docs site by hand on that branch (Actions → Docs
site → Run workflow). It pushes only sha-<commit>, so nothing is deployed.
The old address https://oriolrius.github.io/pki-manager-web/ still works: GitHub Pages now
serves one page (site/legacy/404.html) that sends each reader to the same path on the new site.
Releases
Section titled “Releases”Versions follow conventional commits with Commitizen
(pyproject.toml). One version covers the root, backend and frontend package.json files and the
issuer Helm chart.
cz bumpwrites the version, theCHANGELOG.mdsection and the tagvX.Y.Z.- Edit the new
CHANGELOG.mdsection: its first line is the release title in bold, then a short description.release.ymluses that line as the title (vX.Y.Z — title) and the rest as the notes. - Push the commit and the tag. The tag starts the release and the image workflows.
The site shows the same CHANGELOG.md as its release notes.
PKI Manager is a personal project of Oriol Rius, built for his own use. It is not a commercial product. About this project