adelsz / pgtyped

pgTyped - Typesafe SQL in TypeScript
https://pgtyped.dev
MIT License
2.91k stars 94 forks source link

[cli] Check environment variables for the Postgres Docker image #558

Closed RalphORama closed 8 months ago

RalphORama commented 8 months ago

Is your feature request related to a problem? Please describe.

Sort of. I am using Docker (specifically Docker Compose) to orchestrate the database layer for a project. The environment variables used by the official Postgres image differ from the ones the PgTyped CLI supports

Describe the solution you'd like

It would be nice if support was added to check the equivalent variables:

Docker Environment Variable Currently Supported Equivalent
POSTGRES_PASSWORD PGPASSWORD
POSTGRES_USER PGUSER
POSTGRES_DB PGDATABASE

NB: When POSTGRES_USER is set, the Postgres image names the default database the same value. There may be an edge case that needs a check for this configuration.

Additional context

n/a