mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-11-01 18:59:19 +00:00
Refactored Redis resource include macro and increased memory limits
- Replaced deprecated lookup(vars=...) in svc-db-redis with macro-based include (Ansible/Jinja safe) - Redis now uses higher resource values (1 CPU, 1G reserved, 8G max, 512 pids) - Enables stable Whiteboard operation with >3.5 GB Redis memory usage - Related conversation: https://chatgpt.com/share/68f67a00-d598-800f-a6be-ee5987e66fba
This commit is contained in:
@@ -16,5 +16,12 @@
|
||||
retries: 30
|
||||
networks:
|
||||
- default
|
||||
{{ lookup('template', 'roles/docker-container/templates/resource.yml.j2',vars={'service_name':'redis'}) | indent(4) }}
|
||||
{% macro include_resource_for(svc, indent=4) -%}
|
||||
{% set service_name = svc -%}
|
||||
{%- set _snippet -%}
|
||||
{% include 'roles/docker-container/templates/resource.yml.j2' %}
|
||||
{%- endset -%}
|
||||
{{ _snippet | indent(indent, true) }}
|
||||
{%- endmacro %}
|
||||
{{ include_resource_for('redis') }}
|
||||
{{ "\n" }}
|
||||
@@ -33,10 +33,10 @@ docker:
|
||||
services:
|
||||
redis:
|
||||
enabled: true
|
||||
cpus: "0.25"
|
||||
mem_reservation: "64m"
|
||||
mem_limit: "256m"
|
||||
pids_limit: 256
|
||||
cpus: "1"
|
||||
mem_reservation: "1g"
|
||||
mem_limit: "8g"
|
||||
pids_limit: 512
|
||||
database:
|
||||
enabled: true
|
||||
cpus: "0.75"
|
||||
|
||||
Reference in New Issue
Block a user