refactor(infra): bake config via dockerfile_inline, drop Dockerfile files (refs #30)
Replaces the three standalone Dockerfiles (openzaak, opennotificaties, keycloak) with `build.dockerfile_inline` recipes in the compose files, so the config bake has no separate Dockerfile artifacts to maintain. Behaviour is identical: each derived image still COPYies its config in. - oz-init / keycloak / flowable-init: 2-line inline Dockerfiles. - Open Notificaties needs no bake at all now — nrc-init runs migrations only, so all NRC services use the plain base image (removes a whole derived image). Why dockerfile_inline and not `docker cp` into named volumes: docker cp avoids images entirely but needs `docker compose create`, which podman-compose (the local dev runtime) does not implement — it would break `make openzaak-up` etc. locally. dockerfile_inline works on both podman-compose and the CI runner (verified both: oz-init + keycloak inline builds locally; flowable-init inline has been green on CI since run 27). Docs updated: gitea-actions-gotchas.md and openzaak.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -40,18 +40,24 @@ exposed it.
|
||||
|
||||
**Fix: bake assets into derived images instead of bind-mounting them.** Anything
|
||||
a Compose service needs at runtime that lives in the repo is `COPY`-ed into a
|
||||
small derived image, so it is present regardless of where the daemon runs:
|
||||
small derived image, so it is present regardless of where the daemon runs. We use
|
||||
**`build.dockerfile_inline`** — the 2-line recipe lives in the compose file, so
|
||||
there are no standalone `Dockerfile` artifacts to maintain:
|
||||
|
||||
| Asset | Derived image | Dockerfile |
|
||||
| Asset | Derived image | Built by |
|
||||
|---|---|---|
|
||||
| OpenZaak `setup_configuration/data.yaml` | `register-referentie/openzaak:dev` | `infra/openzaak/Dockerfile` |
|
||||
| Open Notificaties `setup_configuration/data.yaml` | `register-referentie/opennotificaties:dev` | `infra/opennotificaties/Dockerfile` |
|
||||
| Keycloak realm exports | `register-referentie/keycloak:dev` | `infra/keycloak/Dockerfile` |
|
||||
| `workflows/registratie.bpmn` | `register-referentie/flowable-init:dev` | `build.dockerfile_inline` in the compose files |
|
||||
| OpenZaak `setup_configuration/data.yaml` | `register-referentie/openzaak:dev` | `oz-init` `dockerfile_inline` |
|
||||
| Keycloak realm exports | `register-referentie/keycloak:dev` | `keycloak` `dockerfile_inline` |
|
||||
| `workflows/registratie.bpmn` | `register-referentie/flowable-init:dev` | `flowable-init` `dockerfile_inline` |
|
||||
|
||||
The base image tag stays a build `arg` (`OPENZAAK_TAG`, `OPENNOTIFICATIES_TAG`)
|
||||
so version pinning is unchanged. The three `*-init`/web/celery services that share
|
||||
a base now share one built image tag, so the bake happens once per `up --build`.
|
||||
The base image tag is interpolated by Compose (`${OPENZAAK_TAG}`) so pinning is
|
||||
unchanged. OpenZaak's `openzaak`/`oz-celery` reuse the one image `oz-init` builds.
|
||||
Open Notificaties needs **no** bake — `nrc-init` runs migrations only, so all NRC
|
||||
services use the plain base image.
|
||||
|
||||
`dockerfile_inline` works on both the CI runner (docker compose) and local
|
||||
**podman-compose**, unlike `docker cp`-into-volumes (which needs `docker compose
|
||||
create`, a subcommand podman-compose lacks).
|
||||
|
||||
**Why not the alternatives.**
|
||||
|
||||
|
||||
@@ -74,6 +74,6 @@ The Makefile auto-points `DOCKER_HOST` at the Podman socket when it exists, so t
|
||||
- **Image tag.** Pinned to `openzaak/open-zaak:1.28.2` via `${OPENZAAK_TAG}` (bump
|
||||
deliberately, not via `:latest`).
|
||||
- **Config is baked, not mounted.** `setup_configuration/data.yaml` is `COPY`-ed into
|
||||
a derived image (`infra/openzaak/Dockerfile`) rather than bind-mounted, so the
|
||||
init container finds it on Gitea's containerized CI runner too. See
|
||||
[gitea-actions-gotchas.md](gitea-actions-gotchas.md).
|
||||
a derived image via `oz-init`'s inline Dockerfile (`build.dockerfile_inline` in
|
||||
the compose) rather than bind-mounted, so the init container finds it on Gitea's
|
||||
containerized CI runner too. See [gitea-actions-gotchas.md](gitea-actions-gotchas.md).
|
||||
|
||||
Reference in New Issue
Block a user