From db722724449d5c162b4cdb9ad7616cde12a6313e Mon Sep 17 00:00:00 2001 From: Justin Clift Date: Tue, 17 Sep 2024 14:35:44 +1000 Subject: [PATCH] Automatically remove orphans when running make up --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1eada4b3d5..1704cd8305 100644 --- a/Makefile +++ b/Makefile @@ -4,11 +4,11 @@ compose_build: .env COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker compose build up: - docker compose up -d redis postgres + docker compose up -d redis postgres --remove-orphans docker compose exec -u postgres postgres psql postgres --csv \ -1tqc "SELECT table_name FROM information_schema.tables WHERE table_name = 'organizations'" 2> /dev/null \ | grep -q "organizations" || make create_database - COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker compose up -d --build + COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker compose up -d --build --remove-orphans test_db: @for i in `seq 1 5`; do \