Web Push Encryption env vars
To enable push notifications, we need to run this command, that returns a config snippet that needs to go into config.exs
. However, when running this thing in Docker, we would rather use environment variables in order to have a reproducible state and all. So how about adding something like this to config/docker.exs
instead:
config :web_push_encryption, :vapid_details,
subject: System.get_env("$MOBILIZON_WPE_SUBJECT", nil),
public_key: System.get_env("$MOBILIZON_WPE_PUBLIC_KEY", nil),
private_key: System.get_env("$MOBILIZON_WPE_PRIVATE_KEY", nil)
and then adding those environment variables to the env.template
in the Docker repo?
Then instead of having to run that command to generate the keys, the documentation would only say "do another two gpg --gen-random --armor 1 50
for those variables.