feat: init new self-hosting method

This commit is contained in:
swve 2024-04-21 11:50:45 +02:00
parent d5791d99d5
commit d1fde17220
11 changed files with 663 additions and 492 deletions

View file

@ -1,6 +1,7 @@
from typing import Callable
from fastapi import FastAPI
from config.config import LearnHouseConfig, get_learnhouse_config
from src.core.events.autoinstall import auto_install
from src.core.events.content import check_content_directory
from src.core.events.database import close_database, connect_to_db
from src.core.events.logs import create_logs_dir
@ -25,6 +26,9 @@ def startup_app(app: FastAPI) -> Callable:
# Create content directory
await check_content_directory()
# Check if auto-installation is needed
auto_install()
return start_app