mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
Replace the per-role service_replicas Jinja variable with a per-service replicas: field in meta/services.yml. deploy.yml.j2 resolves it via resource_filter (with entity fallback), the same path already used for cpus/mem, so services.yml is the single source of truth for replica overrides. - 13 web roles migrated to per-service (or entity-level) replicas: 1 - matomo bootstrap -> replicas: 0, mastodon migrate -> replicas: 1 - minio/seaweedfs provider entries -> replicas: 1, which also pins the central single-writer object-store providers instead of relying on the topology default - service_replicas removed entirely; dropped its dead reference from the compose-structure lint allowlist and updated requirement 023 wording Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
31 lines
1.1 KiB
Django/Jinja
31 lines
1.1 KiB
Django/Jinja
{% if lookup('objstore', application_id, 'local') %}
|
|
{% set _objstore = lookup('objstore', application_id) %}
|
|
minio:
|
|
image: "{{ _objstore.image }}:{{ _objstore.version }}" # nocheck: container-image-lookup
|
|
{{ lookup('compose_only', 'container_name', _objstore.container) }}
|
|
{{ lookup('compose_restart', DOCKER_RESTART_POLICY) }}
|
|
command: ["server", "/data"]
|
|
environment:
|
|
MINIO_ROOT_USER: "{{ _objstore.access_key }}"
|
|
MINIO_ROOT_PASSWORD: "{{ _objstore.secret_key }}"
|
|
volumes:
|
|
- minio:/data
|
|
networks: # nocheck: networks-literal
|
|
- default
|
|
logging:
|
|
driver: journald
|
|
{% macro include_resource_for(svc, indent=4) -%}
|
|
{% set service_name = svc -%}
|
|
{%- set _snippet -%}
|
|
{% include 'roles/sys-svc-container/templates/resource.yml.j2' %}
|
|
{%- endset -%}
|
|
{{ _snippet | indent(indent, true) }}
|
|
{%- endmacro %}
|
|
{% if DEPLOYMENT_MODE == 'compose' %}
|
|
{{ include_resource_for('minio') }}
|
|
{% endif %}
|
|
{% set service_name = 'minio' %}
|
|
{% include 'roles/sys-svc-container/templates/deploy.yml.j2' %}
|
|
{% endif %}
|
|
{{ "\n" }}
|