forked from topoteretes/cognee
-
Notifications
You must be signed in to change notification settings - Fork 0
/
entrypoint-old.sh
executable file
·35 lines (28 loc) · 991 Bytes
/
entrypoint-old.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
# export ENVIRONMENT
echo "Debug mode: $DEBUG"
echo "Environment: $ENVIRONMENT"
if [ "$ENVIRONMENT" != "local" ]; then
echo "Running fetch_secret.py"
PYTHONPATH=. python cognee/fetch_secret.py
if [ $? -ne 0 ]; then
echo "Error: fetch_secret.py failed"
exit 1
fi
else
echo '"local" environment is active, skipping fetch_secret.py'
fi
echo "Creating database..."
#
#PYTHONPATH=. python cognee/setup_database.py
#if [ $? -ne 0 ]; then
# echo "Error: setup_database.py failed"
# exit 1
#fi
echo "Starting Gunicorn"
if [ "$DEBUG" = true ]; then
echo "Waiting for the debugger to attach..."
python -m debugpy --wait-for-client --listen 0.0.0.0:5678 -m gunicorn -w 3 -k uvicorn.workers.UvicornWorker -t 30000 --bind=0.0.0.0:8000 --bind=0.0.0.0:443 --log-level debug cognee.api.client:app
else
gunicorn -w 3 -k uvicorn.workers.UvicornWorker -t 30000 --bind=0.0.0.0:8000 --bind=0.0.0.0:443 --log-level debug cognee.api.client:app
fi