You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.0 KiB
YAML
37 lines
1.0 KiB
YAML
---
|
|
|
|
postgres_id: "{{ service_name }}-postgres_{{ cluster_service }}"
|
|
|
|
postgres_docker: {
|
|
networks: [
|
|
{
|
|
name: back-tier,
|
|
external: true,
|
|
}
|
|
],
|
|
volumes: [
|
|
{
|
|
name: "{{ postgres_id }}-data"
|
|
}
|
|
],
|
|
services: [
|
|
{
|
|
name: "{{ postgres_id }}",
|
|
image_name: "{{ postgres_image_name }}",
|
|
image_version: "{{ postgres_image_version }}",
|
|
environment: [
|
|
"POSTGRES_DB: \"{{ hostvars[inventory_hostname][cluster_service + '_postgres_database'] | default('postgres') }}\"",
|
|
"POSTGRES_USER: \"{{ hostvars[inventory_hostname][cluster_service + '_postgres_admin_username'] | default('postgres-admin') }}\"",
|
|
"POSTGRES_PASSWORD: \"{{ hostvars[inventory_hostname][cluster_service + '_postgres_admin_password'] | default('postgres-admin') }}\"",
|
|
],
|
|
volumes: [
|
|
'"{{ postgres_id }}-data:/var/lib/postgresql/data"',
|
|
],
|
|
networks: [
|
|
'"back-tier"',
|
|
],
|
|
ports: "{{ postgres_ports | default([]) }}",
|
|
},
|
|
],
|
|
}
|