Files
app-organization-portal/scripts/reset-elastic.sh
2023-04-19 09:26:04 +02:00

12 lines
412 B
Bash

#!/bin/bash
echo "warning this will run queries on the triplestore and delete containers, you have 3 seconds to press ctrl+c"
sleep 3
docker-compose rm -fs elasticsearch search
sudo rm -rf data/elasticsearch/
docker-compose exec -T triplestore isql-v <<EOF
SPARQL DELETE WHERE { GRAPH <http://mu.semte.ch/authorization> { ?s ?p ?o. } };
exec('checkpoint');
exit;
EOF
docker-compose up -d --remove-orphan