Skip to content

Commit cfa7bb9

Browse files
Merge pull request #40 from shadab-mohammad-oracle/patch-5
Create start.sh
2 parents 5589e65 + 3ad47f3 commit cfa7bb9

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

start.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
SSL_DIR="ssl"
4+
KEY_FILE="$SSL_DIR/key.pem"
5+
CERT_FILE="$SSL_DIR/cert.pem"
6+
7+
if [[ ! -f ".venv/bin/activate" ]]; then
8+
echo "❌ Python virtual environment not found. Please run build.sh first."
9+
exit 1
10+
fi
11+
12+
if [[ ! -f "$KEY_FILE" || ! -f "$CERT_FILE" ]]; then
13+
echo "❌ SSL certificate or key missing. Please run build.sh first."
14+
exit 1
15+
fi
16+
17+
echo "🔑 Activating virtual environment..."
18+
# shellcheck source=/dev/null
19+
source .venv/bin/activate
20+
21+
echo "🚦 Starting uvicorn server with HTTPS (https://localhost:8000)"
22+
uvicorn app.main:app --host 0.0.0.0 --port 8000 --ssl-keyfile "$KEY_FILE" --ssl-certfile "$CERT_FILE"

0 commit comments

Comments
 (0)