Merge branch 'feature/icecheng/metrics' into feature/wc
# Conflicts: # apps/metrics/common/config/app_settings.py # apps/metrics/webapi/main.py # apps/metrics/webapi/routes/metrics/__init__.py # apps/metrics/webapi/routes/metrics/registration_metrics.py
This commit is contained in:
commit
ddbf509713
@ -1,5 +1,5 @@
|
||||
# download image here: https://docker.aityp.com/image/docker.io/python:3.12-slim
|
||||
FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/python:3.12-slim
|
||||
FROM python:3.12-slim
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
@ -3,12 +3,6 @@ from typing import Optional
|
||||
|
||||
|
||||
class AppSettings(BaseSettings):
|
||||
# Server settings
|
||||
SERVER_HOST: str = "0.0.0.0"
|
||||
SERVER_PORT: int = 8009
|
||||
SERVICE_API_ACCESS_HOST: str = "0.0.0.0"
|
||||
SERVICE_API_ACCESS_PORT: int = 8009
|
||||
|
||||
# Log settings
|
||||
LOG_BASE_PATH: str = "./logs"
|
||||
BACKEND_LOG_FILE_NAME: str = "freeleaps-metrics"
|
||||
@ -29,7 +23,7 @@ class AppSettings(BaseSettings):
|
||||
|
||||
|
||||
class Config:
|
||||
env_file = "local.env"
|
||||
env_file = ".env"
|
||||
|
||||
|
||||
app_settings = AppSettings()
|
||||
|
||||
@ -3,12 +3,12 @@ from fastapi.responses import RedirectResponse
|
||||
import uvicorn
|
||||
|
||||
from webapi.bootstrap.application import create_app
|
||||
from webapi.routes.starrocks_metrics import metrics_query
|
||||
from webapi.routes.metrics import registration_metrics
|
||||
|
||||
app = create_app()
|
||||
|
||||
# Include routers
|
||||
app.include_router(metrics_query.router)
|
||||
app.include_router(registration_metrics.router)
|
||||
|
||||
|
||||
@app.get("/", status_code=301)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user