| #!/bin/bash |
|
|
| |
| |
|
|
| echo "Starting DocGenie API..." |
|
|
| |
| if [ ! -f .env ]; then |
| echo "Warning: .env file not found. Using .env.example as template." |
| echo "Please copy .env.example to .env and set your ANTHROPIC_API_KEY" |
| |
| if [ -f .env.example ]; then |
| cp .env.example .env |
| echo "Created .env file from .env.example" |
| fi |
| fi |
|
|
| |
| if [ -f .env ]; then |
| export $(cat .env | grep -v '^#' | xargs) |
| fi |
|
|
| |
| if [ -z "$ANTHROPIC_API_KEY" ]; then |
| echo "Error: ANTHROPIC_API_KEY not set in .env file" |
| exit 1 |
| fi |
|
|
| |
| HOST=${API_HOST:-0.0.0.0} |
| PORT=${API_PORT:-8000} |
| WORKERS=${API_WORKERS:-4} |
|
|
| echo "Configuration:" |
| echo " Host: $HOST" |
| echo " Port: $PORT" |
| echo " Workers: $WORKERS" |
| echo "" |
|
|
| |
| uvicorn main:app --host $HOST --port $PORT --workers $WORKERS --reload |
|
|