Skip to content

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
JasoonS merged 1 commit into
mainfrom
jasoons-improve-docker-compose
Feb 24, 2025
Merged

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
JasoonS merged 1 commit into
mainfrom
jasoons-improve-docker-compose

Conversation

@JasoonS

@JasoonS JasoonS commented Feb 24, 2025

Copy link
Copy Markdown
Contributor

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

@DZakh DZakh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice 🔥

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

JasoonS commented Feb 24, 2025

Copy link
Copy Markdown
Contributor Author

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