Skip to content

Commit

Permalink
fix: reset metabase on deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
jamil314 committed Nov 5, 2024
1 parent a679d29 commit 1edcca9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions infrastructure/deployment/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,13 @@ docker_stack_deploy() {
docker stack deploy --prune -c '$(split_and_join " " " -c " "$(to_remote_paths $COMPOSE_FILES_USED)")' --with-registry-auth opencrvs'
}

reset_metabase() {
echo "Reseting metabase"
configured_ssh 'docker service scale opencrvs_dashboards=0 && \
rm /data/metabase/metabase.mv.db && \
docker service scale opencrvs_dashboards=1'
}

validate_options

# Create new passwords for all MongoDB users created in
Expand Down Expand Up @@ -413,6 +420,8 @@ EMAIL_PAYLOAD='{
"to": "{{ALERT_EMAIL}}"
}'

reset_metabase

configured_ssh "docker run --rm --network=opencrvs_overlay_net appropriate/curl \
-X POST 'http://countryconfig:3040/email' \
-H 'Content-Type: application/json' \
Expand Down

0 comments on commit 1edcca9

Please sign in to comment.