First product
This commit is contained in:
parent
778da9e2fc
commit
4433d7d2c4
157 changed files with 23975 additions and 0 deletions
22
scripts/entrypoint.sh
Executable file
22
scripts/entrypoint.sh
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env sh
|
||||
set -eu
|
||||
|
||||
uv run python /app/scripts/wait_for_db.py
|
||||
|
||||
if [ "${MIGRATE_ON_START:-1}" = "1" ]; then
|
||||
uv run alembic upgrade head
|
||||
fi
|
||||
|
||||
if [ "${BOOTSTRAP_ADMIN_ON_START:-0}" = "1" ]; then
|
||||
uv run python /app/scripts/bootstrap_admin.py
|
||||
fi
|
||||
|
||||
if [ "$#" -eq 0 ]; then
|
||||
if [ "${APP_RELOAD:-0}" = "1" ]; then
|
||||
set -- uv run uvicorn app.main:app --host "${APP_HOST:-0.0.0.0}" --port "${APP_PORT:-8000}" --reload
|
||||
else
|
||||
set -- uv run uvicorn app.main:app --host "${APP_HOST:-0.0.0.0}" --port "${APP_PORT:-8000}" --workers "${UVICORN_WORKERS:-1}"
|
||||
fi
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue