Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: modify startup.sh to work for sqlite #2012

Merged
merged 4 commits into from
Nov 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions letta/server/startup.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
#!/bin/sh
echo "Starting MEMGPT server..."
echo "Starting Letta server at http://localhost:8283"

alembic upgrade head
# Check if LETTA_PG_URI or LETTA_PG_DB is set and run alembic upgrade if either is
if [ -n "$LETTA_PG_URI" ] || [ -n "$LETTA_PG_DB" ]; then
echo "LETTA_PG_URI or LETTA_PG_DB is set, running alembic upgrade head"
alembic upgrade head
fi

if [ "$MEMGPT_ENVIRONMENT" = "DEVELOPMENT" ] ; then
if [ "$MEMGPT_ENVIRONMENT" = "DEVELOPMENT" ]; then
echo "Starting in development mode!"
uvicorn letta.server.rest_api.app:app --reload --reload-dir /letta --host 0.0.0.0 --port 8283
else
# Production start command here (replace with the actual production command)
echo "Starting in production mode!"
uvicorn letta.server.rest_api.app:app --host 0.0.0.0 --port 8283
fi
Loading