This commit is contained in:
Mistral Vibe
2026-04-10 00:37:41 +02:00
parent 21ff7167c4
commit d4aad3b8bc
2 changed files with 0 additions and 74 deletions

View File

@@ -1,36 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
echo "→ Checking for Nextcloud service..."
# Check if nextcloud service exists
if ! docker compose ps | grep -q nextcloud; then
echo " Nextcloud service not found in compose setup"
echo " Skipping Nextcloud configuration (external setup required)"
exit 0
fi
echo "→ Configuring Nextcloud via occ..."
NC="docker compose exec -T nextcloud php occ"
# Enable recommended apps
$NC app:enable notify_push 2>/dev/null || echo " notify_push not available, skipping"
$NC app:enable files_accesscontrol 2>/dev/null || echo " files_accesscontrol not available, skipping"
# Create service account for rehearsalhub
$NC user:add \
--display-name "RehearsalHub Service" \
--password-from-env \
rh_service \
<<< "${NEXTCLOUD_ADMIN_PASSWORD:-change_me}" || echo " Service account may already exist"
# Set permissions
$NC user:setting rh_service core lang en
$NC config:system:set trusted_domains 1 --value="${DOMAIN:-localhost}"
$NC config:system:set trusted_domains 2 --value="nc.${DOMAIN:-localhost}"
# Create base folder structure
$NC files:scan --all
echo "✓ Nextcloud setup complete"

View File

@@ -1,38 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
API="${API_URL:-http://localhost/api/v1}"
echo "→ Running database migrations..."
docker compose exec api alembic upgrade head
echo "→ Seeding admin user..."
REGISTER_RESP=$(curl -sf -X POST "$API/auth/register" \
-H "Content-Type: application/json" \
-d '{
"email": "admin@rehearsalhub.local",
"password": "changeme123!",
"display_name": "Admin"
}') || echo " Admin user may already exist"
echo "→ Logging in to get token..."
TOKEN_RESP=$(curl -sf -X POST "$API/auth/login" \
-H "Content-Type: application/json" \
-d '{"email": "admin@rehearsalhub.local", "password": "changeme123!"}')
TOKEN=$(echo "$TOKEN_RESP" | python3 -c "import sys,json; print(json.load(sys.stdin)['access_token'])")
echo "→ Creating demo band..."
curl -sf -X POST "$API/bands" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{
"name": "Demo Band",
"slug": "demo-band",
"genre_tags": ["rock", "jam"]
}' | python3 -m json.tool
echo ""
echo "✓ Seed complete!"
echo " Admin: admin@rehearsalhub.local / changeme123!"
echo " API docs: https://${DOMAIN:-localhost}/api/docs"