mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-20 01:06:03 +02:00
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
33 lines
1.1 KiB
Django/Jinja
33 lines
1.1 KiB
Django/Jinja
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
|
|
|
postgres:
|
|
container_name: "{{ POSTGRES_CONTAINER }}"
|
|
image: "{{ POSTGRES_CUSTOM_IMAGE_NAME }}"
|
|
{% include 'roles/docker-container/templates/build.yml.j2' %}
|
|
command:
|
|
- "postgres"
|
|
- "-c"
|
|
- "max_connections={{ POSTGRES_MAX_CONNECTIONS }}"
|
|
- "-c"
|
|
- "superuser_reserved_connections={{ POSTGRES_SUPERUSER_RESERVED_CONNECTIONS }}"
|
|
- "-c"
|
|
- "shared_buffers={{ POSTGRES_SHARED_BUFFERS }}"
|
|
- "-c"
|
|
- "work_mem={{ POSTGRES_WORK_MEM }}"
|
|
- "-c"
|
|
- "maintenance_work_mem={{ POSTGRES_MAINTENANCE_WORK_MEM }}"
|
|
|
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
|
{% if POSTGRES_EXPOSE_LOCAL %}
|
|
ports:
|
|
- "{{ POSTGRES_LOCAL_HOST }}:{{ POSTGRES_PORT }}:5432"
|
|
{% endif %}
|
|
volumes:
|
|
- "data:/var/lib/postgresql/data"
|
|
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
|
|
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
|
data:
|
|
name: "{{ POSTGRES_VOLUME }}"
|
|
|
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %} |