Fix the couchbase setup.

This commit is contained in:
Andrea Dell'Amico 2023-04-28 12:56:58 +02:00
parent 7c5d4f2233
commit b77771cc3a
Signed by: andrea.dellamico
GPG Key ID: 147ABE6CEB9E20FF
3 changed files with 25 additions and 1 deletions

View File

@ -52,10 +52,20 @@ open_asfa_couchbase_image: 'couchbase:community'
open_asfa_couchbase_volume_type: 'local'
open_asfa_couchbase_volume_o: ""
open_asfa_couchbase_volume_device: ""
open_asfa_couchbase_connect_string: "couchbase://couchbase"
open_asfa_couchbase_connect_string: "couchbase://{{ open_asfa_docker_stack_name }}_couchbase"
open_asfa_couchbase_username: "Administrator"
# open_asfa_couchbase_password: "use a vault"
open_asfa_couchbase_bucket: "harvester"
# resource limits
# cpus: '4.00'
# memory: 8192M
# resource reservations:
# cpus: '2.00'
# memory: 4096M
open_asfa_couchbase_cpu_limit: "4.00"
open_asfa_couchbase_cpu_reservation: "2.00"
open_asfa_couchbase_memory_limit: "8192M"
open_asfa_couchbase_memory_reservation: "4096M"
open_asfa_geoname_key: dicondina
open_asfa_agrovoc_url: "https://agrovoc.fao.org/"

View File

@ -29,6 +29,9 @@ services:
volumes:
- {{ open_asfa_couchbase_volume }}:/opt/couchbase/var
deploy:
mode: replicated
replicas: 1
endpoint_mode: dnsrr
placement:
constraints: [node.role == worker]
restart_policy:
@ -36,5 +39,12 @@ services:
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'

View File

@ -31,6 +31,10 @@ services:
REALM: {{ open_asfa_keycloak_realm }}
CLIENT: {{ open_asfa_keycloak_client_name }}
CLIENT_ID: {{ open_asfa_keycloak_client_id }}
COUCHBASE_CONNECTION_STRING: {{ open_asfa_couchbase_connect_string }}
COUCHBASE_USERNAME: {{ open_asfa_couchbase_username }}
COUCHBASE_PASSWORD: {{ open_asfa_couchbase_password }}
COUCHBASE_BUCKET: {{ open_asfa_couchbase_bucket }}
GEONAME_KEY: {{ open_asfa_geoname_key }}
AGROVOC_URL: {{ open_asfa_agrovoc_url }}
deploy: