Files
visual_critical_discourse_a…/web_ui/src/main.py
T
brian ba0fc050fe
CI Pipeline / Test (pull_request) Successful in 2m23s
CI Pipeline / Build and Publish (./Dockerfile.model, ${{ vars.docker_repo_url }}/${{ gitea.repository }}/model) (pull_request) Successful in 7m3s
CI Pipeline / Build and Publish (./Dockerfile.web_ui, ${{ vars.docker_repo_url }}/${{ gitea.repository }}/web_ui) (pull_request) Successful in 6m13s
fixed mypy types
2024-10-19 21:37:08 +00:00

32 lines
629 B
Python

"""Definition of web_ui main script."""
from __future__ import annotations
import os
from shared.data_store import connect_minio
from shared.database import connect_mongodb
from shared.utils import check_env, setup_logging
from .app import init_app
# ensure env vars set
check_env()
# setup logging stream handler
setup_logging()
# connect to database
collection, db, client = connect_mongodb()
# connect to minio
minio_client = connect_minio()
# initialise application
app = init_app(
mongo_collection=collection,
minio_client=minio_client,
)
server = app.server
server.config.update(SECRET_KEY=os.urandom(24))