Skip to content

Commit

Permalink
Install mealie as CLI command, use in Dockerfile
Browse files Browse the repository at this point in the history
* Remove assumption about the root of the mealie package being on the
  Python path (change "app:app" -> "mealie.app:app" in `main.py`).
* Remove `start` entrypoint because it is not used and the name "start"
  is too generic.`
  • Loading branch information
chishm committed Oct 7, 2024
1 parent b0ed242 commit 8e53cfa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docker/entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ init
# Start API
HOST_IP=`/sbin/ip route|awk '/default/ { print $3 }'`

exec python /app/mealie/main.py
exec mealie
2 changes: 1 addition & 1 deletion mealie/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

def main():
uvicorn.run(
"app:app",
"mealie.app:app",
host=settings.API_HOST,
port=settings.API_PORT,
log_level=settings.LOG_LEVEL.lower(),
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name = "mealie"
version = "1.12.0"

[tool.poetry.scripts]
start = "mealie.app:main"
mealie = "mealie.main:main"

[tool.poetry.dependencies]
Jinja2 = "^3.1.2"
Expand Down

0 comments on commit 8e53cfa

Please sign in to comment.