diff --git a/main.py b/main.py index 60514ba..d9f1d13 100644 --- a/main.py +++ b/main.py @@ -11,9 +11,19 @@ # See the License for the specific language governing permissions and # limitations under the License. - +import typer +from nwastdlib.logging import initialise_logging +from orchestrator import app_settings from orchestrator.cli.main import app as core_cli +from orchestrator.db import init_database +from orchestrator.log_config import LOGGER_OVERRIDES + + +def init_cli_app() -> typer.Typer: + initialise_logging(LOGGER_OVERRIDES) + init_database(app_settings) + return core_cli() if __name__ == "__main__": - core_cli() + init_cli_app()