Files
mealie/mealie/run.sh
Hayden 3e80947a4c refactor/docker-updates (#369)
* 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>
2021-04-29 17:47:01 -08:00

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