Cannot connect to database with "@" in the username or password - JavaScript grouparoo

When setting DATABASE_URL, if your username or password has an "@" (and possibly ":") in it, Grouparoo can't connect.

DATABASE_URL="postgresql://{user}:{password}@{host}:{port}/{database}?{ssl=true}".

Since the : and @ are meaningful to the URL parser.

REDIS_URL likely has the same problem

Asked Oct 05 '21 09:10
avatar evantahler
evantahler

2 Answer:

If we can't solve this with URL parsing, we should document that we have fall-back environment variables that can also be used instead of the combined DATABASEURL: * DBDIALECT * DBHOST * DBPORT * DBDATABASE * DBUSER * DB_PASS

See https://github.com/grouparoo/grouparoo/blob/main/core/src/config/sequelize.ts for more info

1
Answered Mar 18 '21 at 18:59
avatar  of evantahler
evantahler

Documentation updated via https://github.com/grouparoo/www.grouparoo.com/pull/340

REDIS_* and DB_* environment variables normalized via https://github.com/grouparoo/grouparoo/pull/1521 and https://github.com/grouparoo/grouparoo/pull/1522

1
Answered Mar 22 '21 at 20:14
avatar  of evantahler
evantahler