Add docker-entrypoint.sh
This commit is contained in:
parent
cb876f47a8
commit
0a873c3e54
1 changed files with 25 additions and 0 deletions
25
docker-entrypoint.sh
Normal file
25
docker-entrypoint.sh
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#!/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 "$@"
|
||||
Reference in a new issue