Skip to content

Commit 5e69679

Browse files
committed
Improved env interactions
1 parent 4d49009 commit 5e69679

File tree

3 files changed

+32
-8
lines changed

3 files changed

+32
-8
lines changed

.env.example

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
DB_CONNECTED=false
22
AGIXT_AUTO_UPDATE=true
3-
AGIXT_API_KEY=
43
AGIXT_HUB=AGiXT/light-hub
5-
AGIXT_URI=http://agixt:7437
4+
AGIXT_API_KEY=
5+
UVICORN_WORKERS=4
66
GITHUB_USER=
77
GITHUB_TOKEN=
8-
UVICORN_WORKERS=6
98
POSTGRES_SERVER=db
10-
POSTGRES_DB=postgres
119
POSTGRES_PORT=5432
10+
POSTGRES_DB=postgres
1211
POSTGRES_USER=postgres
13-
POSTGRES_PASSWORD=postgres
12+
POSTGRES_PASSWORD=postgres
13+
AGIXT_URI=http://agixt:7437

agixt/launch-backend.sh

+26-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,31 @@
11
#!/bin/sh
22

33
set -e
4+
5+
# Check if .env file exists
6+
if [ -f ".env" ]; then
7+
echo "Sourcing .env file..."
8+
source .env
9+
elif [ -f "../.env" ]; then
10+
echo "Sourcing ../.env file..."
11+
source ../.env
12+
else
13+
# Check if .env.example file exists in the current directory
14+
if [ -f ".env.example" ]; then
15+
echo "No .env file found, sourcing .env.example from current directory..."
16+
source .env.example
17+
else
18+
# Check if .env.example file exists in the parent directory
19+
if [ -f "../.env.example" ]; then
20+
echo "No .env or ../.env file found, sourcing .env.example from parent directory..."
21+
source ../.env.example
22+
else
23+
echo "No .env, ../.env, or .env.example file found!"
24+
exit 1
25+
fi
26+
fi
27+
fi
28+
429
workers="${UVICORN_WORKERS:-4}"
530

631
if [ "$DB_CONNECTED" = "true" ]; then
@@ -23,6 +48,5 @@ if [ "$DB_CONNECTED" = "true" ]; then
2348
fi
2449
# Install AGiXT Hub
2550
python3 Hub.py
26-
echo "Starting AGiXT..."
27-
sleep 5
51+
echo "Starting AGiXT... Please wait until you see 'Applicaton startup complete' before opening Streamlit..."
2852
uvicorn app:app --host 0.0.0.0 --port 7437 --workers $workers --proxy-headers

agixt/version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.3.19
1+
v1.3.20

0 commit comments

Comments
 (0)