Skip to content

Commit

Permalink
change the clear data script so that it doesn't touch /data directory…
Browse files Browse the repository at this point in the history
… directly. This helps us restrict deployment user's access to data
  • Loading branch information
rikukissa committed Dec 15, 2023
1 parent db4dca9 commit 07a18b2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions infrastructure/clear-all-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,13 @@ docker run --rm --network=$NETWORK appropriate/curl curl -X POST 'http://influxd

# Delete all data from minio
#-----------------------------
rm -rf /data/minio/ocrvs
mkdir -p /data/minio/ocrvs
docker run --rm --network=$NETWORK --entrypoint=/bin/sh minio/mc -c "\
mc alias set myminio http://minio:9000 $MINIO_ROOT_USER $MINIO_ROOT_PASSWORD && \
mc rm --recursive --force myminio/ocrvs && \
mc rb myminio/ocrvs && \
mc mb myminio/ocrvs"

# Delete all data from metabase
#-----------------------------
rm -rf /data/metabase/*
docker exec -it $(docker ps | grep opencrvs_dashboards | awk '{print $1}' | head -n 1) /bin/sh -c "rm -rf /data/metabase/*"

0 comments on commit 07a18b2

Please sign in to comment.