root: extract custom setup code (#15150)
This commit is contained in:

committed by
GitHub

parent
6a367d4ddf
commit
d043dacece
@ -7,8 +7,6 @@ from pathlib import Path
|
||||
from tempfile import gettempdir
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from cryptography.hazmat.backends.openssl.backend import backend
|
||||
from defusedxml import defuse_stdlib
|
||||
from prometheus_client.values import MultiProcessValue
|
||||
|
||||
from authentik import get_full_version
|
||||
@ -18,6 +16,7 @@ from authentik.lib.logging import get_logger_config
|
||||
from authentik.lib.utils.http import get_http_session
|
||||
from authentik.lib.utils.reflection import get_env
|
||||
from authentik.root.install_id import get_install_id_raw
|
||||
from authentik.root.setup import setup
|
||||
from lifecycle.migrate import run_migrations
|
||||
from lifecycle.wait_for_db import wait_for_db
|
||||
from lifecycle.worker import DjangoUvicornWorker
|
||||
@ -28,10 +27,7 @@ if TYPE_CHECKING:
|
||||
|
||||
from authentik.root.asgi import AuthentikAsgi
|
||||
|
||||
defuse_stdlib()
|
||||
|
||||
if CONFIG.get_bool("compliance.fips.enabled", False):
|
||||
backend._enable_fips()
|
||||
setup()
|
||||
|
||||
wait_for_db()
|
||||
|
||||
|
Reference in New Issue
Block a user