Remove configurable APP_VERSION and define it in code
All checks were successful
PostgreSQL Compatibility Matrix / PG14 smoke (push) Successful in 8s
PostgreSQL Compatibility Matrix / PG15 smoke (push) Successful in 8s
PostgreSQL Compatibility Matrix / PG16 smoke (push) Successful in 8s
PostgreSQL Compatibility Matrix / PG17 smoke (push) Successful in 8s
PostgreSQL Compatibility Matrix / PG18 smoke (push) Successful in 8s

The APP_VERSION variable is no longer configurable via the `.env` file or environment settings. Instead, the version is now hardcoded in `backend/app/core/config.py` as `NEXAPG_VERSION` and accessed through a property. This change simplifies version control and ensures consistency across deployments.
This commit is contained in:
2026-02-13 09:07:10 +01:00
parent e24681332d
commit 18d6289807
3 changed files with 7 additions and 4 deletions

View File

@@ -2,12 +2,13 @@ from functools import lru_cache
from pydantic import field_validator
from pydantic_settings import BaseSettings, SettingsConfigDict
NEXAPG_VERSION = "0.1.1"
class Settings(BaseSettings):
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8", extra="ignore")
app_name: str = "NexaPG Monitor"
app_version: str = "0.1.0"
environment: str = "dev"
api_v1_prefix: str = "/api/v1"
log_level: str = "INFO"
@@ -33,6 +34,10 @@ class Settings(BaseSettings):
init_admin_email: str = "admin@example.com"
init_admin_password: str = "ChangeMe123!"
@property
def app_version(self) -> str:
return NEXAPG_VERSION
@property
def database_url(self) -> str:
return (