|
3 | 3 | from typing import cast |
4 | 4 |
|
5 | 5 | from fastapi import FastAPI |
6 | | -from models_library.basic_types import ( |
7 | | - BootModeEnum, |
8 | | - BuildTargetEnum, |
9 | | - LogLevel, |
10 | | - PortInt, |
11 | | - VersionTag, |
12 | | -) |
13 | | -from pydantic import Field, NonNegativeInt, PositiveInt, validator |
| 6 | +from models_library.basic_types import LogLevel, PortInt, VersionTag |
| 7 | +from pydantic import Field, NonNegativeInt, validator |
14 | 8 | from servicelib.logging_utils_filtering import LoggerName, MessageSubstring |
15 | | -from settings_library.base import BaseCustomSettings |
| 9 | +from settings_library.application import BaseApplicationSettings |
16 | 10 | from settings_library.docker_registry import RegistrySettings |
17 | 11 | from settings_library.postgres import PostgresSettings |
18 | 12 | from settings_library.tracing import TracingSettings |
|
21 | 15 | from .._meta import API_VERSION, API_VTAG, APP_NAME |
22 | 16 |
|
23 | 17 |
|
24 | | -class ApplicationSettings(BaseCustomSettings, MixinLoggingSettings): |
25 | | - # CODE STATICS --------------------------------------------------------- |
| 18 | +class ApplicationSettings(BaseApplicationSettings, MixinLoggingSettings): |
26 | 19 | API_VERSION: str = API_VERSION |
27 | 20 | APP_NAME: str = APP_NAME |
28 | 21 | API_VTAG: VersionTag = API_VTAG |
29 | 22 |
|
30 | | - # IMAGE BUILDTIME ------------------------------------------------------ |
31 | | - # @Makefile |
32 | | - SC_BUILD_DATE: str | None = None |
33 | | - SC_BUILD_TARGET: BuildTargetEnum | None = None |
34 | | - SC_VCS_REF: str | None = None |
35 | | - SC_VCS_URL: str | None = None |
36 | | - |
37 | | - # @Dockerfile |
38 | | - SC_BOOT_MODE: BootModeEnum | None = None |
39 | | - SC_BOOT_TARGET: BuildTargetEnum | None = None |
40 | | - SC_HEALTHCHECK_TIMEOUT: PositiveInt | None = Field( |
41 | | - None, |
42 | | - description="If a single run of the check takes longer than timeout seconds " |
43 | | - "then the check is considered to have failed." |
44 | | - "It takes retries consecutive failures of the health check for the container to be considered unhealthy.", |
45 | | - ) |
46 | | - SC_USER_ID: int | None = None |
47 | | - SC_USER_NAME: str | None = None |
48 | | - |
49 | | - # RUNTIME ----------------------------------------------------------- |
50 | 23 | DIRECTOR_DEBUG: bool = Field( |
51 | 24 | default=False, description="Debug mode", env=["DIRECTOR_DEBUG", "DEBUG"] |
52 | 25 | ) |
|
0 commit comments