mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-09 03:04:54 -04:00
added env variable
This commit is contained in:
parent
78758e1026
commit
f412c3dd5b
@ -16,6 +16,7 @@ To deploy docker on your local network it is highly recommended to use docker to
|
|||||||
| db_password | example | The Mongodb password you specified in your mongo container |
|
| db_password | example | The Mongodb password you specified in your mongo container |
|
||||||
| db_host | mongo | The host address of MongoDB if you're in docker and using the same network you can use mongo as the host name |
|
| db_host | mongo | The host address of MongoDB if you're in docker and using the same network you can use mongo as the host name |
|
||||||
| db_port | 27017 | the port to access MongoDB 27017 is the default for mongo |
|
| db_port | 27017 | the port to access MongoDB 27017 is the default for mongo |
|
||||||
|
| api_docs | True | Turns on/off access to the API documentation locally. |
|
||||||
| TZ | | You should set your time zone accordingly so the date/time features work correctly |
|
| TZ | | You should set your time zone accordingly so the date/time features work correctly |
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,13 +15,19 @@ from routes import (
|
|||||||
user_routes,
|
user_routes,
|
||||||
)
|
)
|
||||||
from routes.setting_routes import scheduler # ! This has to be imported for scheduling
|
from routes.setting_routes import scheduler # ! This has to be imported for scheduling
|
||||||
from settings import PORT, PRODUCTION
|
from settings import PORT, PRODUCTION, docs_url, redoc_url
|
||||||
from utils.logger import logger
|
from utils.logger import logger
|
||||||
|
|
||||||
CWD = Path(__file__).parent
|
CWD = Path(__file__).parent
|
||||||
WEB_PATH = CWD.joinpath("dist")
|
WEB_PATH = CWD.joinpath("dist")
|
||||||
|
|
||||||
app = FastAPI()
|
app = FastAPI(
|
||||||
|
title="Mealie",
|
||||||
|
description="A place for all your recipes",
|
||||||
|
version="0.0.1",
|
||||||
|
docs_url=docs_url,
|
||||||
|
redoc_url=redoc_url,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
# Mount Vue Frontend only in production
|
# Mount Vue Frontend only in production
|
||||||
|
@ -10,6 +10,14 @@ dotenv.load_dotenv(ENV)
|
|||||||
# General
|
# General
|
||||||
PRODUCTION = os.environ.get("ENV")
|
PRODUCTION = os.environ.get("ENV")
|
||||||
PORT = int(os.getenv("mealie_port", 9000))
|
PORT = int(os.getenv("mealie_port", 9000))
|
||||||
|
API = os.getenv("api_docs", True)
|
||||||
|
|
||||||
|
if API:
|
||||||
|
docs_url = "/docs"
|
||||||
|
redoc_url = "/redoc"
|
||||||
|
else:
|
||||||
|
docs_url = None
|
||||||
|
redoc_url = None
|
||||||
|
|
||||||
# Mongo Database
|
# Mongo Database
|
||||||
MEALIE_DB_NAME = os.getenv("mealie_db_name", "mealie")
|
MEALIE_DB_NAME = os.getenv("mealie_db_name", "mealie")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user