mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-07 19:32:17 +00:00
A defaulted build argument answers a question the caller failed to answer. The build then succeeds against a base image, version or path nobody chose, and the mistake surfaces as wrong behaviour at runtime instead of a failed build. web-app-bridgy-fed shows the cost: its metadata declared python 3.14 while the Dockerfile default silently built against 3.12. Both look plausible, so nothing pointed at the drift. It and web-app-postmarks now take the base image from the same services declaration the rest of the role reads. The lint walks every tracked Dockerfile, template variants and paths outside roles/ included, which the existing ARG-scope check does not. A second assertion fails when the scan finds no Dockerfile at all, so the rule cannot pass vacuously if the walk ever breaks. Touching the two Dockerfiles brought their pre-existing narration under the comment lint; what carried substance moved into the file header.
21 lines
1.0 KiB
Django/Jinja
21 lines
1.0 KiB
Django/Jinja
{% include 'roles/sys-svc-compose/templates/base.yml.j2' %}
|
|
{% set service_name = 'bridgy-fed' %}
|
|
{{ service_name }}:
|
|
{{ lookup('template', 'roles/sys-svc-container/templates/build.yml.j2') | indent(4) }}
|
|
args:
|
|
PY_BASE: "{{ lookup('config', application_id, 'services.bridgy-fed.image') }}:{{ lookup('config', application_id, 'services.bridgy-fed.version') }}"
|
|
BRIDGY_REPO_URL: "{{ BRIDGY_REPO_URL }}"
|
|
BRIDGY_REF: "{{ BRIDGY_REF }}"
|
|
CONTAINER_PORT: "{{ container_port | string }}"
|
|
{{ lookup('container_image', application_id, 'bridgy-fed') }}
|
|
{{ lookup('compose_only', 'container_name', BRIDGY_CONTAINER) }}
|
|
hostname: "{{ container_hostname }}"
|
|
{{ lookup('container_ports', ['bridgy-fed', 'http', DOCKER_BIND_HOST]) | indent(4) }}
|
|
{{ lookup('container_healthcheck', service_name) | indent(4) }}
|
|
{% include 'roles/sys-svc-container/templates/base.yml.j2' %}
|
|
{{ lookup('container_networks') | indent(4) }}
|
|
|
|
{{ lookup('compose_volumes') }}
|
|
|
|
{{ lookup('compose_networks') }}
|