refactored database roles and added support for remote hosts
parent
b874434f2d
commit
116fbc95c2
@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
elasticsearch_replicas: 1
|
||||||
|
|
||||||
|
postgres_service_name: 'postgresdb'
|
||||||
|
postgres_replicas: 1
|
||||||
|
postgres_conductor_db: postgres
|
||||||
|
postgres_jdbc_user: conductor
|
||||||
|
postgres_jdbc_pass: password
|
||||||
|
postgres_jdbc_db: conductor
|
||||||
|
postgres_jdbc_url: jdbc:postgresql://{{ postgres_service_name }}:5432/{{ mysql_jdbc_db }}
|
||||||
|
|
||||||
|
mysql_image_name: 'mariadb'
|
||||||
|
mysql_service_name: 'mysqldb'
|
||||||
|
mysql_replicas: 1
|
||||||
|
mysql_conductor_db: mysql
|
||||||
|
mysql_jdbc_user: conductor
|
||||||
|
mysql_jdbc_pass: password
|
||||||
|
mysql_jdbc_db: conductor
|
||||||
|
mysql_jdbc_url: jdbc:mysql://{{ mysql_service_name }}:3306/{{ mysql_jdbc_db }}?useSSL=false&allowPublicKeyRetrieval=true
|
||||||
|
|
@ -0,0 +1,31 @@
|
|||||||
|
version: '3.6'
|
||||||
|
|
||||||
|
services:
|
||||||
|
|
||||||
|
elasticsearch:
|
||||||
|
image: docker.elastic.co/elasticsearch/elasticsearch:5.6.8
|
||||||
|
environment:
|
||||||
|
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
|
||||||
|
- transport.host=0.0.0.0
|
||||||
|
- discovery.type=single-node
|
||||||
|
- xpack.security.enabled=false
|
||||||
|
networks:
|
||||||
|
{{ conductor_network }}:
|
||||||
|
aliases:
|
||||||
|
- es
|
||||||
|
logging:
|
||||||
|
driver: "journald"
|
||||||
|
deploy:
|
||||||
|
mode: replicated
|
||||||
|
replicas: {{ elasticsearch_replicas }}
|
||||||
|
#endpoint_mode: dnsrr
|
||||||
|
placement:
|
||||||
|
constraints: [node.role == worker]
|
||||||
|
restart_policy:
|
||||||
|
condition: on-failure
|
||||||
|
delay: 5s
|
||||||
|
max_attempts: 3
|
||||||
|
window: 120s
|
||||||
|
|
||||||
|
networks:
|
||||||
|
{{ conductor_network }}:
|
@ -0,0 +1,31 @@
|
|||||||
|
version: '3.6'
|
||||||
|
|
||||||
|
services:
|
||||||
|
|
||||||
|
{{ postgres_service_name }}:
|
||||||
|
image: postgres
|
||||||
|
ports:
|
||||||
|
- "5432:5432"
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: "{{ postgres_jdbc_user }}"
|
||||||
|
POSTGRES_PASSWORD: "{{ postgres_jdbc_pass }}"
|
||||||
|
POSTGRES_DB: "{{ postgres_jdbc_db }}"
|
||||||
|
{% if init_db %}
|
||||||
|
configs:
|
||||||
|
- source: db-init
|
||||||
|
target: "/docker-entrypoint-initdb.d/db-init.sql"
|
||||||
|
{% endif %}
|
||||||
|
networks:
|
||||||
|
- {{ conductor_network }}
|
||||||
|
deploy:
|
||||||
|
replicas: {{ postgres_replicas }}
|
||||||
|
placement:
|
||||||
|
constraints: [node.role == worker]
|
||||||
|
|
||||||
|
networks:
|
||||||
|
{{ conductor_network }}:
|
||||||
|
{% if init_db %}
|
||||||
|
configs:
|
||||||
|
db-init:
|
||||||
|
file: {{ target_path }}/conductor-db-init.sql
|
||||||
|
{% endif %}
|
Loading…
Reference in New Issue