From 6b5b1f0f418b95dc445f3bb74e0deeaa44dd8d4f Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 2 Oct 2024 14:39:12 +0200 Subject: [PATCH] build(Makefile): start memcached and minio containers for serving --- Makefile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Makefile b/Makefile index b3080d88a..d9dbe3c56 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,10 @@ export db ?= -cf export DEV_PORT_HTTP export DEV_PORT_HTTPS +export MEMCACHED_IMAGE = docker.io/memcached:latest +export MINIO_IMAGE = docker.io/minio/minio:latest +export MAILDEV_IMAGE = docker.io/maildev/maildev:latest + # HELP HEADER START # To see the definition of all available targets, take a look into the Makefile. # Targets starting with '--' are not meant to be directly called. @@ -72,11 +76,19 @@ release: ############################################ ##### UNIFIED FRONTEND/BACKEND TARGETS ##### +# TODO: rewrite all serve-targets to do the following: +# - return immediately +# - podman-run with -d (detached mode) and save the container id in a file +# - provide commands (make-targets?) to access logs of running containers +# - additionally provide targets for termination of running containers .PHONY: serve # HELP: serve frontend, backend, and database serve: CONTAINER_INTERACTIVE=-it serve: $(MAKE) serve-database & + $(MAKE) serve-memcached & + $(MAKE) serve-minio & +# $(MAKE) serve-maildev & # TODO: needs different port than 1025 to avoid conflicts $(MAKE) serve-frontend & $(MAKE) serve-backend @@ -229,6 +241,14 @@ serve-database: --containerized-database; $(CONTAINER_COMMAND) run -it $(CONTAINER_PORTS) --name fradrive.$(FRADRIVE_SERVICE).$$(date +'%Y-%m-%dT%H-%M-%S') fradrive/$(FRADRIVE_SERVICE) ; \ fi +.PHONY: serve-memcached +serve-memcached: + $(CONTAINER_COMMAND) run -it --network=host $(MEMCACHED_IMAGE) + +.PHONY: serve-minio +serve-minio: + $(CONTAINER_COMMAND) run -it --network=host $(MINIO_IMAGE) -- server $$(mktemp) + ##### DATABASE TARGETS ##### ############################