diff --git a/setup.sh b/setup.sh index 933aec1..a23d99c 100755 --- a/setup.sh +++ b/setup.sh @@ -108,6 +108,17 @@ echo "This may take a few minutes on first run..." echo "" podman build --network=host -t sneakyscan . + +# Initialize database if it doesn't exist or is empty +echo "" +echo "Initializing database..." +podman run --rm --entrypoint python3 -w /app \ + -v "$(pwd)/data:/app/data" \ + -e DATABASE_URL=sqlite:////app/data/sneakyscanner.db \ + -e INITIAL_PASSWORD="${INITIAL_PASSWORD:-}" \ + sneakyscan init_db.py --db-url sqlite:////app/data/sneakyscanner.db +echo "✓ Database initialized" + podman-compose up -d # Wait for service to be healthy