mirror of
https://github.com/lfnovo/open-notebook.git
synced 2026-04-29 03:50:04 +00:00
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:
parent
d7b0fff954
commit
3b2ced54e2
7 changed files with 359 additions and 341 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue