Skip to content

feat(templates): add app deployment template (image, compose, Helm) - #928

Open
rubenvdlinde wants to merge 3 commits into
mainfrom
feat/app-deploy-templates
Open

rubenvdlinde wants to merge 3 commits into
mainfrom
feat/app-deploy-templates

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

What

templates/app-deploy/ is one set of deployment artefacts for every Conduction Nextcloud app, parameterised by the app id only. render.sh <app-id> <repo> writes into an app:

  • a root Dockerfile: the official nextcloud:33.0.10-apache image with the app built from the repository (same build steps and file set as the release tarball) and the newest stable OpenRegister release, checked against its published SHA-256. Prereleases are refused. Nothing secret is baked in.
  • docker/entrypoint-hooks/before-starting/10-image-apps.sh: on every start, copies a newer baked app over the persistent copy, runs occ upgrade when needed and enables OpenRegister, then the app.
  • docker-compose.yml: that image with PostgreSQL and Redis, every setting documented, port bound to 127.0.0.1. When an app already has a root docker-compose.yml (its developer stack), the evaluation stack goes to docker/docker-compose.yml and the existing file is left alone.
  • charts/<app>/: a chart over the official nextcloud/helm chart 9.4.1, running the same image with PostgreSQL.
  • .github/workflows/container-image.yml: builds and pushes ghcr.io/conductionnl/<app> after each release. Stable: version tag and latest. Beta and unstable: edge only.

The release workflows now also exclude /Dockerfile, /.dockerignore and /charts from the app tarball.

Why

These are the deployment artefacts the Common Ground checker looks for (Dockerfile plus compose, a published image, a Helm chart). They are described everywhere as an evaluation image; the App Store stays the production install path.

Choices

  • Nextcloud 33 because the 34 and 35 images ship PHP 8.5, and learniq declares PHP 8.4 as its maximum.
  • One copy per app instead of a shared chart, because the checker cannot credit a chart in another repository.

Verified locally

  • hadolint 0 findings, shellcheck clean.
  • planninq render: docker build ok, docker compose config ok, helm lint, helm template and kubeconform (12/12 valid).
  • planninq stack started end to end: Nextcloud installed, OpenRegister and planninq enabled by the hook, /apps/planninq/ and the OpenRegister API answer 200, restart is idempotent.

AI disclosure: drafted with Claude Code and reviewed before submission.

🤖 Generated with Claude Code

templates/app-deploy renders, per app id, an evaluation Dockerfile (official
Nextcloud 33 image with the app built from the repo and the newest stable
OpenRegister release, SHA-256 checked), an entrypoint hook that syncs and
enables the baked apps, a docker-compose.yml with PostgreSQL and Redis, a
Helm chart over the official Nextcloud chart and an image workflow that
pushes ghcr.io/conductionnl/<app> (stable: version and latest; prerelease:
edge). The release workflows keep these files out of the app tarball.

Assisted-by: ClaudeCode:claude-opus-5-5
The workflow-level permissions now grant contents: read only; the image job, which pushes to ghcr.io, gets packages: write. Same change as ConductionNL/openregister#10938, so a re-render keeps it.

Assisted-by: ClaudeCode:claude-opus-5-5
…ped-package-write

ci(templates): scope packages: write to the app-deploy image job

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant