conductor-setup/roles/databases/templates/postgres-swarm.yaml.j2

21 lines
482 B
Django/Jinja

version: '3.6'
services:
{{ postgres_service_name }}:
image: postgres
environment:
POSTGRES_USER: "{{ postgres_jdbc_user }}"
POSTGRES_PASSWORD: "{{ postgres_jdbc_pass }}"
POSTGRES_DB: "{{ postgres_jdbc_db }}"
networks:
- {{ conductor_network }}
deploy:
replicas: {{ postgres_replicas }}
{% if infrastructure != 'local' %}
placement:
constraints: [node.role == worker]
{% endif %}
networks:
{{ conductor_network }}: