Has anyone successfully run supertokens core on heroku with heroku's psql? I'm getting an issue wit...
z
Has anyone successfully run supertokens core on heroku with heroku's psql? I'm getting an issue with drivers. The database url begins with
postgresql://
so it seems the
jdbc:
prefix is coming from someplace else?
Copy code
Setting up PostgreSQL connection pool.
2022-10-07T02:04:20.842175+00:00 app[web.1]: Stopping SuperTokens...
2022-10-07T02:04:20.856938+00:00 app[web.1]: What caused the crash: Driver org.postgresql.Driver claims to not accept jdbcUrl, jdbc:postgres://ec2-107-23-76-12.compute-1.amazonaws.com:5432/....
n
@jscyo Maybe you can check this?
j
Hey, taking a look
Hey @zachequi , so as mentioned in this post https://stackoverflow.com/questions/34741443/hikaricp-postgresql-driver-claims-to-not-accept-jdbc-url you will need to change the
postgres
in your connection uri to
postgresql
your updated connection uri should look like
postgresql://ec2-107-23-76-12.compute-1.amazonaws.com:5432/....
z
Yep, Did that. Same error.
export PSQL_URL=$(echo $DATABASE_URL | sed 's/jdbc:postgres/postgresql/')
ah... maybe it's just
export PSQL_URL=$(echo $DATABASE_URL | sed 's/postgres:/postgresql:/')
Ah, that fixed it! The error log from supertokens said
jdbc:postgres
so that's what I was trying to transform. this worked:
Copy code
export PSQL_URL=$(echo $DATABASE_URL | sed 's/postgres/postgresql/')
echo -e "postgresql_connection_uri: $PSQL_URL\npostgresql_table_schema: supertokens\ncore_config_version: 0" > config.yaml
35 Views