From a86cc9983abb13484d711592a882cb426142a518 Mon Sep 17 00:00:00 2001 From: Justin Clift Date: Sat, 21 Oct 2023 14:34:50 +1000 Subject: [PATCH] Add docker:emptydb yarn command, to blow away the dev dbhub db Useful for creating an empty dbhub database, ready to have an existing populated snapshot loaded into it for dev purposes --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index b813e5f2d..b151d4fe7 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "docker:attach": "docker attach dbhub-build", "docker:build": "docker build --tag dbhub-build docker", "docker:debug": "docker exec -it dbhub-build /bin/sh /usr/local/bin/debug.sh", + "docker:emptydb": "docker exec -it dbhub-build pkill dbhub- && docker exec -itu postgres dbhub-build sh -c 'dropdb dbhub && createdb -O dbhub dbhub'", "docker:exec": "docker exec -it dbhub-build /bin/sh", "docker:github": "docker run -itd --rm --name dbhub-build -p 9443-9445:9443-9445/tcp --mount type=bind,src=\"$(pwd)\",target=/dbhub.io dbhub-build:latest", "docker:psql": "docker exec -it dbhub-build psql -U dbhub dbhub",