Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update the docker compose file to have the correct connection string for Hasura to connect to Postgres if a different user or different database are used. #459

Merged
merged 1 commit into from
Feb 24, 2025

Conversation

JasoonS
Copy link
Contributor

@JasoonS JasoonS commented Feb 24, 2025

No description provided.

@JasoonS JasoonS requested review from DZakh and JonoPrest February 24, 2025 10:37
… for Hasura to connect to Postgres if a different user or different database are used.
@JasoonS JasoonS force-pushed the jasoons-improve-docker-compose branch from d9d3728 to a38c100 Compare February 24, 2025 15:00
Copy link
Member

@DZakh DZakh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 🔥

@@ -93,7 +93,7 @@ let deleteAllTables: unit => promise<unit> = async () => {
BEGIN
DROP SCHEMA IF EXISTS ${Env.Db.publicSchema} CASCADE;
CREATE SCHEMA ${Env.Db.publicSchema};
GRANT ALL ON SCHEMA ${Env.Db.publicSchema} TO postgres;
GRANT ALL ON SCHEMA ${Env.Db.publicSchema} TO ${Env.Db.user};
GRANT ALL ON SCHEMA ${Env.Db.publicSchema} TO public;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lines existance or the change to make it a param?

I believe we do need to grant permissions to the user that HyperIndex is using. and we shouldn't hardcode it to Postgres if we are allowing it to be configurable by an environment variable.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm talking about public

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the confusion 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, no worries. Actually you right - maybe not 🤔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's used for Hasura, but we can use Env.Db.user for this

@JasoonS
Copy link
Contributor Author

JasoonS commented Feb 24, 2025

To validate - run export ENVIO_PG_USER="tester"; export ENVIO_PG_DATABASE="other-db"; - lenvio local docker down - lenvio dev (in any indexer)

@JasoonS JasoonS merged commit f8f5238 into main Feb 24, 2025
1 check passed
@JasoonS JasoonS deleted the jasoons-improve-docker-compose branch February 24, 2025 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants