mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-03-03 20:23:11 -05:00
* file structure * auto-test * take 2 * refactor ap scheduler and startup process * fixed scraper error * database abstraction * database abstraction * port recipes over to new schema * meal migration * start settings migration * finale mongo port * backup improvements * migration imports to new DB structure * unused import cleanup * docs strings * settings and theme import logic * cleanup * fixed tinydb error * requirements * fuzzy search * remove scratch file * sqlalchemy models * improved search ui * recipe models almost done * sql modal population * del scratch * rewrite database model mixins * mostly grabage * recipe updates * working sqllite * remove old files and reorganize * final cleanup Co-authored-by: Hayden <hay-kot@pm.me>
18 lines
437 B
Python
18 lines
437 B
Python
import mongoengine
|
|
from settings import DB_HOST, DB_PASSWORD, DB_PORT, DB_USERNAME, MEALIE_DB_NAME
|
|
from utils.logger import logger
|
|
|
|
|
|
def global_init():
|
|
mongoengine.register_connection(
|
|
alias="core",
|
|
name=MEALIE_DB_NAME,
|
|
host=DB_HOST,
|
|
port=int(DB_PORT),
|
|
username=DB_USERNAME,
|
|
password=DB_PASSWORD,
|
|
authentication_source="admin",
|
|
)
|
|
|
|
logger.info("Mongo Data Initialized")
|