From b5b8567074016d72581c8e2c5d74e6cbad8f0d94 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 23 Oct 2024 00:51:44 +0200 Subject: [PATCH 1/4] build(Makefile): start-database for test --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index aeee8dbbe..51a135b62 100644 --- a/Makefile +++ b/Makefile @@ -112,7 +112,7 @@ lint: lint-frontend lint-backend; .PHONY: test # HELP: test frontend, backend, and check internationalization -test: test-frontend test-backend i18n-check; +test: start-database test-frontend test-backend i18n-check; ##### UNIFIED FRONTEND/BACKEND TARGETS ##### ############################################ From 8028a1f36bdfa6f75d18294c2c74ae4f6ffe203e Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 23 Oct 2024 01:13:03 +0200 Subject: [PATCH 2/4] build(Makefile): fix stop-% --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 51a135b62..6fe902b95 100644 --- a/Makefile +++ b/Makefile @@ -352,7 +352,8 @@ stop: rm -rf develop .PHONY: stop-% # HELP(stop-{database,memcached,minio,backend,frontend,hoogle}): stop all currently running develop instances of a given type -stop-%: --stop-% +stop-%: + $(SET_DEVELOP) rm -rf $(DEVELOP)/$* stop-container-by-file: rm $(CONTAINER_FILE) From 80a7bc4b08f71f3609b6db5b16bca2f51f777ff9 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 23 Oct 2024 01:13:43 +0200 Subject: [PATCH 3/4] build(Makefile): stop running containers before clean --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 6fe902b95..7c4dcccf5 100644 --- a/Makefile +++ b/Makefile @@ -57,9 +57,11 @@ help: .PHONY: clean # HELP: remove all compilation results in the directory but leave containers and images unharmed clean: + $(MAKE) stop -rm -rf node_modules .npm .cache assets/icons assets/favicons static well-known -rm -rf .stack-work .stack-work-build .stack-work-run .stack-work-test .stack-work-doc -rm -rf bin .Dockerfile develop + -$(CONTAINER_COMMAND) container prune --force .PHONY: clean-all # HELP: like clean but with container and image prune clean-all: clean From f669eed080c3e3b57b9ebc0f1da114021a26c7c1 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 23 Oct 2024 01:18:45 +0200 Subject: [PATCH 4/4] build(Makefile): set container name for memcached --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7c4dcccf5..8a30163d5 100644 --- a/Makefile +++ b/Makefile @@ -262,7 +262,7 @@ db: --image-build --containerized---db; --containerized---start-memcached: MEMCACHED_PORT=`cat $(CONTAINER_FILE) | grep 'MEMCACHED_PORT=' | sed 's/MEMCACHED_PORT=//'`; \ ./utils/watchcontainerrun.sh "$(CONTAINER_COMMAND)" "$(CONTAINER_FILE)" & \ - CONTAINER_ID=`$(CONTAINER_BGRUN) $(MEMCACHED_IMAGE) --port=$${MEMCACHED_PORT}` ; \ + CONTAINER_ID=`$(CONTAINER_BGRUN) --name fradrive.memcached.$$(date +'%Y-%m-%dT%H-%M-%S') $(MEMCACHED_IMAGE) --port=$${MEMCACHED_PORT}` ; \ printf "CONTAINER_ID=$${CONTAINER_ID}\nMEMCACHED_PORT=$${MEMCACHED_PORT}" >> $(CONTAINER_FILE) --containerized-%-database: FRADRIVE_SERVICE=database