22 lines
501 B
Python
22 lines
501 B
Python
from __future__ import annotations
|
|
|
|
import os
|
|
|
|
import uvicorn
|
|
|
|
from ota_agent.app import create_app
|
|
from ota_agent.config import load_config
|
|
from ota_agent.logging_utils import setup_logging
|
|
|
|
|
|
def main() -> None:
|
|
config_path = os.environ.get("OTA_AGENT_CONFIG", "config.yaml")
|
|
config = load_config(config_path)
|
|
setup_logging(config.storage.log_dir)
|
|
app = create_app(config)
|
|
uvicorn.run(app, host=config.server.host, port=config.server.port)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|