build(Makefile): start memcached and minio containers for serving
This commit is contained in:
parent
1b447a330d
commit
6b5b1f0f41
20
Makefile
20
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 #####
|
||||
############################
|
||||
|
||||
|
||||
Reference in New Issue
Block a user