26 lines
531 B
Bash
26 lines
531 B
Bash
|
|
#!/bin/bash
|
||
|
|
set -e
|
||
|
|
|
||
|
|
echo "Starting Claude Persistent Agent..."
|
||
|
|
|
||
|
|
# Ensure claude code is available
|
||
|
|
if ! command -v claude &> /dev/null; then
|
||
|
|
echo "Claude Code not found, installing..."
|
||
|
|
npm install -g @anthropic-ai/claude-code
|
||
|
|
fi
|
||
|
|
|
||
|
|
# Initialize backend
|
||
|
|
cd /app
|
||
|
|
|
||
|
|
# Ensure required directories exist
|
||
|
|
mkdir -p /app/data /app/logs /app/tasks
|
||
|
|
|
||
|
|
# Initialize database
|
||
|
|
python -c "from backend.main import init_db; init_db()"
|
||
|
|
|
||
|
|
echo "Database initialized"
|
||
|
|
echo "Starting services..."
|
||
|
|
|
||
|
|
# Execute the main command (supervisord)
|
||
|
|
exec "$@"
|