ansible-role-open-asfa-test/templates/open-asfa-couchbase-docker-...

51 lines
1.3 KiB
Django/Jinja

version: '3.6'
networks:
{% if open_asfa_behind_haproxy %}
haproxy-public:
external: true
{% endif %}
{{ open_asfa_docker_network }}:
volumes:
{{ open_asfa_couchbase_volume }}:
{% if open_asfa_couchbase_volume_type == "nfs4" %}
driver: local
driver_opts:
type: {{ open_asfa_couchbase_volume_type }}
o: "{{ open_asfa_couchbase_volume_o }}"
device: "{{ open_asfa_couchbase_volume_device }}"
{% endif %}
services:
couchbase:
image: {{ open_asfa_couchbase_image }}
networks:
- {{ open_asfa_docker_network }}
{% if open_asfa_behind_haproxy %}
- haproxy-public
{% endif %}
volumes:
- {{ open_asfa_couchbase_volume }}:/opt/couchbase/var
deploy:
mode: replicated
replicas: 1
endpoint_mode: dnsrr
placement:
constraints: [node.role == worker]
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
resources:
limits:
cpus: '{{ open_asfa_couchbase_cpu_limit }}'
memory: {{ open_asfa_couchbase_memory_limit }}
reservations:
cpus: '{{ open_asfa_couchbase_cpu_reservation }}'
memory: {{ open_asfa_couchbase_memory_reservation }}
logging:
driver: 'journald'