Some checks are pending
Build and Push Docker Images / changes (push) Waiting to run
Build and Push Docker Images / build-backend (push) Blocked by required conditions
Build and Push Docker Images / build-frontend (push) Blocked by required conditions
Build and Push Docker Images / build-admin-frontend (push) Blocked by required conditions
22 lines
529 B
Python
22 lines
529 B
Python
import asyncio
|
|
import sys
|
|
import os
|
|
|
|
# Add backend to path
|
|
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
|
|
|
from app.db.database import init_db
|
|
from app.core.logging import setup_logging
|
|
|
|
async def main():
|
|
setup_logging()
|
|
print("Initializing database...")
|
|
try:
|
|
await init_db()
|
|
print("Database initialized successfully.")
|
|
except Exception as e:
|
|
print(f"Error initializing database: {e}")
|
|
|
|
if __name__ == "__main__":
|
|
asyncio.run(main())
|