Skip to content

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

Closed

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...

Activity

  1. janmeier commented on May 15, 2016

    @janmeier
    Member

    Sequelize does not support a config.json file - If you are using a config file with sequelize you must be passing those variables manually to sequelize. If you are using it with umzug / cli, please report the issue in the corresponding repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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