mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-12-11 04:45:22 -05:00
* convert all images to webp * consolidate docker files * serve images wiith caddy * consolidate docker files * new slim-buster image * set image url * add image path * remove print * set image path correctly * cleanup * caddy proxy path * docs Co-authored-by: hay-kot <hay-kot@pm.me>
30 lines
544 B
Bash
Executable File
30 lines
544 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Get Reload Arg `run.sh reload` for dev server
|
|
ARG1=${1:-production}
|
|
|
|
# # Initialize Database Prerun
|
|
poetry run python /app/mealie/db/init_db.py
|
|
poetry run python /app/mealie/services/image/minify.py
|
|
|
|
# Migrations
|
|
# TODO
|
|
# Migrations
|
|
# Set Port from ENV Variable
|
|
|
|
if [ "$ARG1" == "reload" ]
|
|
then
|
|
echo "Hot Reload!"
|
|
|
|
# Start API
|
|
python /app/mealie/app.py
|
|
else
|
|
echo "Production"
|
|
# Web Server
|
|
caddy start --config ./Caddyfile
|
|
|
|
# Start API
|
|
uvicorn mealie.app:app --host 0.0.0.0 --port 9000
|
|
fi
|
|
|