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
32 lines
629 B
Python
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))
|