forked from 3wordchant/capsul-flask
simplify postgres connection parameters as a single string
This commit is contained in:
@ -38,10 +38,13 @@ app.config.from_mapping(
|
||||
SPOKE_HOST_TOKEN=os.environ.get("SPOKE_HOST_TOKEN", default="default"),
|
||||
HUB_TOKEN=os.environ.get("HUB_TOKEN", default="default"),
|
||||
|
||||
DATABASE_URL=os.environ.get("DATABASE_URL", default="sql://postgres:dev@localhost:5432/postgres"),
|
||||
|
||||
# https://www.postgresql.org/docs/9.1/libpq-ssl.html#LIBPQ-SSL-SSLMODE-STATEMENTS
|
||||
DATABASE_SSLMODE=os.environ.get("DATABASE_SSLMODE", default="prefer"),
|
||||
# https://stackoverflow.com/questions/56332906/where-to-put-ssl-certificates-when-trying-to-connect-to-a-remote-database-using
|
||||
# TLS example: sslmode=verify-full sslrootcert=letsencrypt-root-ca.crt host=db.example.com port=5432 user=postgres password=dev dbname=postgres
|
||||
POSTGRES_CONNECTION_PARAMETERS=os.environ.get(
|
||||
"POSTGRES_CONNECTION_PARAMETERS",
|
||||
default="host=localhost port=5432 user=postgres password=dev dbname=postgres"
|
||||
),
|
||||
|
||||
DATABASE_SCHEMA=os.environ.get("DATABASE_SCHEMA", default="public"),
|
||||
|
||||
|
Reference in New Issue
Block a user