Open
Description
The things which currently go wrong
- Docker Compose tries to dereference any passphrase containing
$foo
and requires$$foo
- The default passphrases are wrapped in double quotes, which require escapes in YAML
- After switching to single quotes, then single quotes within the passphrases need to be doubled
''
- Single quotes, even when doubled, then fail to pass through to Postgres when it creates the initial user
-
~
isn't permitted, due to a regex assumption withinentrypoint.sh
- Setting new passphrases requires changing a git-tracked file
Things which can be fixed
- Passphrases should be escaped when they're sent to Postgres and other services
- The regex assumption should be replaced with something which doesn't care about the value
- The passphrases should be read from env vars and handled entirely by the user; no more changes to git-tracked files should be needed (this encourages people to commit the passphrases to git)
- We should invite and encourage people, in our docs, to use the
.env
file which docker-compose reads; docs here - The variables used for passphrases should fail if not supplied; i.e.
SECRETS_secret_key: "${SECRETS_secret_key:?err}"