docs(Makefile): add help messages

This commit is contained in:
Sarah Vaupel 2025-03-25 15:33:45 +01:00
parent d55efd77f7
commit e7c7ec7a82

View File

@ -38,9 +38,9 @@ endif
-rf -rf backend/.stack
# TODO: only release when build and tests are passing!!!
.PHONY: release
# HELP: create, commit and push a new release
# TODO: only release when build and tests are passing!!!
release:
VERSION=`./utils/version.pl -changelog CHANGELOG.md -v` ; \
git add CHANGELOG.md ; \
@ -53,6 +53,7 @@ release:
# HELP: perform full compilation (frontend and backend)
compile: compile-frontend compile-backend ;
.PHONY: compile-%
# HELP(compile-$SERVICE): compile a given service once
compile-%:
docker compose run --remove-orphans --build --no-deps $* make compile
@ -61,27 +62,34 @@ compile-%:
start: start-postgres start-maildev start-memcached start-minio start-backend
docker compose run backend make start
.PHONY: start-%
# HELP(start-$SERVICE): start a given service
start-%:
docker compose up -d --build $*
.PHONY: stop
# HELP: stop all services
stop:
docker compose down
.PHONY: stop-%
# HELP(stop-$SERVICE): stop a given service
stop-%:
docker compose down $*
.PHONY: kill-%
# HELP(kill-$SERVICE): kill a given service the hard way. Use this if the servive does not respond to stop.
kill-%:
docker compose kill $*
.PHONY: status
# HELP: print an overview of currently running services and their health
status:
docker compose ps
.PHONY: top
# HELP: print an overview of the ressource usage of the currently running services
top:
docker compose stats
.PHONY: log-%
# HELP(log-$SERVICE): follow the output of a given service. Service must be running.
log-%:
docker compose logs --follow --timestamps $*