From 3c9e0838371de2bef6330a91e3bf26cddcc69944 Mon Sep 17 00:00:00 2001 From: Sam Doran Date: Wed, 15 Jan 2025 13:55:23 -0500 Subject: [PATCH] Add make target to stop the database --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c3348c3..8644602 100644 --- a/Makefile +++ b/Makefile @@ -37,10 +37,13 @@ install-dev: venv $(PIP) install -r requirements/requirements-dev-$(PYTHON_VERSION).txt .PHONY: run-db -run-db: +run-db: stop-db + $(CONTAINER_RUNTIME) run --rm -d -p $(DB_PORT):5432 --name digital-roadmap-data $(DB_IMAGE) + +.PHONY: stop-db +stop-db: @$(CONTAINER_RUNTIME) stop digital-roadmap-data > /dev/null 2>&1 || true @sleep 0.1 - $(CONTAINER_RUNTIME) run --rm -d -p $(DB_PORT):5432 --name digital-roadmap-data $(DB_IMAGE) .PHONY: run run: