From f5927bad70eeff1b5b580c5df8c22d1d2002ba5f Mon Sep 17 00:00:00 2001 From: Don Seiler Date: Mon, 23 Jul 2018 12:31:47 -0500 Subject: [PATCH] Add EnvironmentFile directive (#746) Add an EnvironmentFile directive to read in a configuration file with environment variables. The "-" prefix means it can proceed if the file doesn't exist. This would allow users to keep sensitive information like the SUPERUSER/REPLICATION passwords in the config file separate from a YAML file that might be deployed from source control. --- extras/startup-scripts/patroni.service | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extras/startup-scripts/patroni.service b/extras/startup-scripts/patroni.service index 86a6f723..153ad2bd 100644 --- a/extras/startup-scripts/patroni.service +++ b/extras/startup-scripts/patroni.service @@ -11,6 +11,9 @@ Type=simple User=postgres Group=postgres +# Read in configuration file if it exists, otherwise proceed +EnvironmentFile=-/etc/patroni_env.conf + WorkingDirectory=~ # Where to send early-startup messages from the server