fix environment variable error and enable docker build automation (#94)

* chore: fix database import error

* remove unused file and improve env example

* docker build automation
This commit is contained in:
Luis Novo 2025-07-17 09:54:28 -03:00 committed by GitHub
parent d7b0fff954
commit 3b2ced54e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 359 additions and 341 deletions

View file

@ -49,11 +49,13 @@ async def db_connection():
db = AsyncSurreal(get_database_url())
await db.signin(
{
"username": os.environ["SURREAL_USER"],
"username": os.environ.get("SURREAL_USER"),
"password": get_database_password(),
}
)
await db.use(os.environ["SURREAL_NAMESPACE"], os.environ["SURREAL_DATABASE"])
await db.use(
os.environ.get("SURREAL_NAMESPACE"), os.environ.get("SURREAL_DATABASE")
)
try:
yield db
finally: