Add PostgreSQL dir with socket to Docker container as a volume
Also explicitly set path to pg_dump 9.6 to avoid using old 9.5 postgres
client.
Fixes: PROD-31827
Change-Id: I727073c1caec40f11b87afcd64e31cdc50185a83
diff --git a/backupninja/client/single.yml b/backupninja/client/single.yml
index 7bf8b7b..62279fe 100644
--- a/backupninja/client/single.yml
+++ b/backupninja/client/single.yml
@@ -3,6 +3,8 @@
parameters:
backupninja:
client:
+ extra_params:
+ PGSQLDUMP: /usr/lib/postgresql/${_param:postgresql_major_version}/bin/pg_dump
scheduling:
when:
- manual
diff --git a/defaults/postgresql/init.yml b/defaults/postgresql/init.yml
index e0d3de1..5b0fdea 100644
--- a/defaults/postgresql/init.yml
+++ b/defaults/postgresql/init.yml
@@ -6,4 +6,5 @@
postgresql_glusterfs_volume_name: postgresql-data
postgresql_data_mountpoint: /var/lib/postgresql/data
postgresql_data_directory: ${_param:postgresql_data_mountpoint}/pgdata
+ postgresql_major_version: '9.6'
diff --git a/docker/swarm/stack/postgresql.yml b/docker/swarm/stack/postgresql.yml
index 12eb874..2d6d7e7 100644
--- a/docker/swarm/stack/postgresql.yml
+++ b/docker/swarm/stack/postgresql.yml
@@ -26,5 +26,6 @@
condition: any
volumes:
- /srv/volumes/postgresql/data:/var/lib/postgresql/data
+ - /var/run/postgresql:/var/run/postgresql
ports:
- ${_param:postgresql_exposed_port}:${_param:postgresql_bind_port}