mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 06:23:34 -07:00
update run script
This commit is contained in:
parent
dd3bf23ce5
commit
ac362b5692
1 changed files with 24 additions and 8 deletions
|
@ -1,14 +1,30 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Initialize Database Prerun
|
# Get Reload Arg `run.sh reload` for dev server
|
||||||
python mealie/db/init_db.py
|
ARG1=${1:-production}
|
||||||
python mealie/services/image/minify.py
|
|
||||||
|
|
||||||
## Migrations
|
# Set Script Directory
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||||
|
|
||||||
|
# # Initialize Database Prerun
|
||||||
|
poetry run python $DIR/db/init_db.py
|
||||||
|
poetry run python $DIR/services/image/minify.py
|
||||||
|
|
||||||
|
# Migrations
|
||||||
# TODO
|
# TODO
|
||||||
|
|
||||||
## Web Server
|
if [[ "$ARG1" = "reload" ]]
|
||||||
caddy start --config ./Caddyfile
|
then
|
||||||
|
echo "Hot Reload!"
|
||||||
|
|
||||||
|
# Start API
|
||||||
|
uvicorn mealie.app:app --host 0.0.0.0 --port 9000 --reload
|
||||||
|
else
|
||||||
|
echo "Production"
|
||||||
|
# Web Server
|
||||||
|
caddy start --config ./Caddyfile
|
||||||
|
|
||||||
|
# Start API
|
||||||
|
uvicorn mealie.app:app --host 0.0.0.0 --port 9000
|
||||||
|
fi
|
||||||
|
|
||||||
# Start API
|
|
||||||
uvicorn mealie.app:app --host 0.0.0.0 --port 9000
|
|
Loading…
Add table
Add a link
Reference in a new issue