-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.py
More file actions
35 lines (28 loc) · 1.01 KB
/
server.py
File metadata and controls
35 lines (28 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Copyright (c) 2010-2025 Evolveum and contributors
#
# Licensed under the EUPL-1.2 or later.
import uvicorn
from src.common.logger import setup_logging
from src.config import config
setup_logging()
def run_application():
uvicorn.run(
"src.app:api",
host=config.app.host,
port=config.app.port,
reload=config.app.live_reload,
workers=config.app.workers,
proxy_headers=config.app.proxy_headers,
forwarded_allow_ips=config.app.forwarded_allow_ips,
root_path=config.app.root_path,
timeout_keep_alive=config.app.timeout_keep_alive,
timeout_graceful_shutdown=config.app.timeout_graceful_shutdown,
limit_concurrency=config.app.limit_concurrency,
limit_max_requests=config.app.limit_max_requests,
ssl_certfile=config.app.ssl_certfile,
ssl_keyfile=config.app.ssl_keyfile,
access_log=config.logging.access_log,
log_level=config.logging.level.value,
)
if __name__ == "__main__":
run_application()