-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: modify
startup.sh
to work for sqlite (#2012)
- Loading branch information
1 parent
9c1b0d3
commit b2dd1ea
Showing
1 changed file
with
9 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |