mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-12-07 19:05:35 -05:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user