6dccf494f8
cleanup permit policies and correct documentation * docs * policy cleanup * refactor * Merge remote-tracking branch 'origin/feature/permit-policy-cleanup' into feature/permit-policy-cleanup * docs and edits
15 lines
375 B
Bash
Executable File
15 lines
375 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
echo "Waiting for OPA to be ready..."
|
|
until curl -f http://localhost:8181/v1/data > /dev/null 2>&1; do
|
|
echo "OPA not ready yet, waiting..."
|
|
sleep 2
|
|
done
|
|
|
|
echo "Loading policy data into OPA..."
|
|
curl -X PUT http://localhost:8181/v1/data/static \
|
|
-H "Content-Type: application/json" \
|
|
-d @policy-data.json
|
|
|
|
echo "Policy data loaded successfully!" |