feat: add backend CI/CD deployment

This commit is contained in:
hailt 2026-11-12 21:32:31 +07:00
parent 8d40cff227
commit 7c2e6ed571
21 changed files with 269 additions and 41 deletions

View file

@ -73,10 +73,10 @@ async def init_db():
await conn.run_sync(Base.metadata.create_all)
factory = get_session_factory()
async with factory() as s:
admin = (await s.execute(select(User).where(User.email == "admin@danable.local"))).scalar_one_or_none()
admin = (await s.execute(select(User).where(User.email == "admin@danagble.local"))).scalar_one_or_none()
if admin is None:
s.add(User(email="admin@danable.local", name="Admin", role="admin",
s.add(User(email="admin@danagble.local", name="Admin", role="admin",
status="active", password_hash=hash_password("Admin123!"),
assigned_project_ids=[]))
await s.commit()
return {"ok": True, "seeded_admin": "admin@danable.local"}
return {"ok": True, "seeded_admin": "admin@danagble.local"}