init. project

This commit is contained in:
2026-04-13 11:34:23 +08:00
commit c7c0659a85
202 changed files with 31196 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
#!/bin/sh
# exit on error
set -e
echo "Waiting for MySQL..."
while ! nc -z db 3306; do
sleep 1
done
echo "MySQL started"
echo "Running migrations..."
if alembic upgrade head; then
echo "Migrations completed successfully"
else
echo "Migration failed"
exit 1
fi
echo "Starting application..."
if [ "$ENVIRONMENT" = "development" ]; then
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
else
uvicorn app.main:app --host 0.0.0.0 --port 8000
fi