edgedb / edgedb-docker

Official Docker Image packaging for EdgeDB
83 stars 16 forks source link

Allow specifying an alternative environment variable for a param #37

Closed elprans closed 2 years ago

elprans commented 2 years ago

This adds a way to specify a given parameter value in an arbitrary environment variable given via <PARAM>_ENV. For example:

EDGEDB_SERVER_BACKEND_DSN_ENV=DATABASE_URL

The above is especially useful when running the edgedb container from a host that allows linking hosted PostgreSQL instances, like DigitalOcean or Fly.io (both use DATABASE_URL)

tailhook commented 2 years ago
  1. Should we consistently support these in all places?
  2. I think in all other places we decided that there will be no conflicting variables, but rather some has priority over other. Why making an exception here?
elprans commented 2 years ago

Should we consistently support these in all places?

We already do via _env in DSN. I don't think _ENV env var redirection is particularly useful outside of the docker image entrypoint.

we decided that there will be no conflicting variables

It's an error to have both password and password_env in the DSN.