-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update launch script for darwin (#78)
- Loading branch information
Kris Hansen
authored
Oct 27, 2023
1 parent
50b7ae8
commit 3ca8237
Showing
2 changed files
with
16 additions
and
0 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
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,5 +1,15 @@ | ||
#!/bin/bash | ||
|
||
# Check if the OS is macOS | ||
if [[ "$(uname)" == "Darwin" ]]; then | ||
# Check if the Redis service is running | ||
if ! pgrep redis-server > /dev/null; then | ||
# If not, start Redis service using Homebrew | ||
brew services start redis | ||
fi | ||
fi | ||
|
||
|
||
service redis-server start | ||
celery -A solidgpt.src.api.celery_tasks worker --loglevel=info --detach | ||
uvicorn solidgpt.src.api.api:app --proxy-headers --host 0.0.0.0 --port 8000 |