Skip to content

Do not required hardcoded postgres connection uri in config file #1016

@apjoseph

Description

@apjoseph

Tegola is using PGX to connect to Postgis enabled postgres database. By default, PGX handles standard libpq env variables like PGHOST, PGDATABASE, PGPORT, PGUSER, PGPASSWORD. However Tegola forces either hardcoding the connection url into the config file or manually setting interpolated env vars. This is clunky and unintuitive (especially if you have a password that contains a character that needs escaping) and could be solved by making the connection uri in the config file optional and allowing pgx to handle validating the connection. directly.

If multiple postgis providers are needed, postgres has a built in convention for this using the pgservicefile which is also supported by default by PGX without any additional configuration needed

an optional service parameter could be added to allow switching between multiple providers. This way Tegola does not need to reinvent the wheel and manually handle what PGX can already do.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions