dev: Create a Python package, build Docker images from it (#4551)

Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
This commit is contained in:
Michael Chisholm
2025-02-12 01:28:40 +10:00
committed by GitHub
parent abf73e08ec
commit c0ab7673ba
19 changed files with 357 additions and 91 deletions

View File

@@ -12,6 +12,7 @@ from pydantic_settings import BaseSettings, SettingsConfigDict
from mealie.core.settings.themes import Theme
from .db_providers import AbstractDBProvider, db_provider_factory
from .static import PACKAGE_DIR
class ScheduleTime(NamedTuple):
@@ -109,7 +110,7 @@ class AppSettings(AppLoggingSettings):
BASE_URL: str = "http://localhost:8080"
"""trailing slashes are trimmed (ex. `http://localhost:8080/` becomes ``http://localhost:8080`)"""
STATIC_FILES: str = ""
STATIC_FILES: str = str(PACKAGE_DIR / "frontend")
"""path to static files directory (ex. `mealie/dist`)"""
IS_DEMO: bool = False

View File

@@ -5,4 +5,5 @@ from mealie import __version__
APP_VERSION = __version__
CWD = Path(__file__).parent
PACKAGE_DIR = CWD.parent.parent
BASE_DIR = CWD.parent.parent.parent

View File

@@ -6,7 +6,7 @@ from mealie.core.logger.config import log_config
def main():
uvicorn.run(
"app:app",
"mealie.app:app",
host=settings.API_HOST,
port=settings.API_PORT,
log_level=settings.LOG_LEVEL.lower(),