Skip to content

Can't connect to postgres using SSL when using "use_env_variable" in config.json #5891

@cgreening

Description

@cgreening

This works without any issues:

  "production": {
    "username": "XXX",
    "password": "XXX",
    "database": "XXX",
    "host": "XXX",
    "port": "XXX",
    "dialect": "postgres",
    "dialectOptions": {
      "ssl": true,
      "native": true
    }
  }

But this does not:

  "production": {
  "use_env_variable": "DATABASE_URL",
    "dialect": "postgres",
    "dialectOptions": {
      "ssl": true,
      "native": true
    }
}

Using a database URL like this:

 export DATABASE_URL="postgres://XXX:XXXX@XXXXX:XXXX/XXXX?ssl=true

Adding the ?ssl=true makes no difference, using the dialectOptions makes no difference. Seems like the ssl is ignored completely when using a DATABASE_URL...

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