Refactor: unify Docker build config via build.yml.j2 include

Replaced duplicated inline build definitions in multiple docker-compose.yml.j2
templates with a shared include (roles/docker-container/templates/build.yml.j2).
This ensures consistent use of pull_policy: never and Dockerfile context across
services (Postgres, Bookwyrm, Bridgy Fed, Chess, Confluence, Jira, Moodle,
OpenProject, Pretix, Roulette Wheel, WordPress, XWiki, Simpleicons).

Conversation: https://chatgpt.com/share/68cd8f35-b764-800f-9b00-2c837103d2fb
This commit is contained in:
2025-09-19 19:13:44 +02:00
parent 96ded68ef4
commit a4a8061998
14 changed files with 20 additions and 43 deletions

View File

@@ -9,9 +9,7 @@
(python manage.py initdb || true) &&
python -m gunicorn bookwyrm.wsgi:application --bind 0.0.0.0:{{ container_port }}
'
build:
context: .
dockerfile: Dockerfile
{% include 'roles/docker-container/templates/build.yml.j2' %}
image: "{{ BOOKWYRM_CUSTOM_IMAGE }}"
container_name: "{{ BOOKWYRM_CONTAINER }}"
hostname: "{{ BOOKWYRM_HOSTNAME }}"