Use postgres as default session service#46
Merged
falquaddoomi merged 7 commits intomainfrom Mar 11, 2026
Merged
Conversation
…p the stack, to have it use postgres
d33bs
approved these changes
Mar 11, 2026
Collaborator
There was a problem hiding this comment.
This could be worth a quick check with shellcheck. I don't see anything especially dangerous but it might provide some good feedback for string composition.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As mentioned in #45, a recent(?) change to the version of
google-adkwe're using is causing an exception when we attempt to add figures to the context when using the default session service,InMemorySessionService.A quick fix introduced in this PR is to switch to
DatabaseSessionService, in our case backed by postgres. Recent(?) changes ingoogle-adkrequire the database connection to be async-compatible, so this PR also adds a dependency on asyncpg and has the backend use it when constructing a database connection.This PR amends the documentation to use the
docker-compose.with-pg.ymlcompose config in both the dev and prod instructions, which starts a postgres container and instructs the backend to use it.I also included a
run_stack.shshell script and would like to know if we'd like to switch the documentation over to using it. There are a few perks to using it:.env.TEMPLATEfile to.envand fills in missing passwords with secure randomly-generated onesOf course, encouraging them to use
run_stack.shimplies they have a GNU environment in which to run bash scripts.Closes #45.