Update Makefile targets and doc

This commit is contained in:
2025-09-22 12:57:27 -07:00
parent 58db72a7e8
commit 59ec522637
2 changed files with 15 additions and 6 deletions

View File

@@ -2,6 +2,9 @@
BINARY_NAME=middleware
DOCKER_IMAGE=slack-to-ntfy
VERSION?=latest
# DOCKER_REGISTRY is optional. If set, it will be used for pushing. Otherwise, images are loaded locally.
# Default target
help:
@@ -29,7 +32,13 @@ clean:
rm -f $(BINARY_NAME)
docker-build:
docker build -t $(DOCKER_IMAGE) .
ifndef DOCKER_REGISTRY
# DOCKER_REGISTRY is not set, load locally
docker buildx build --platform linux/amd64,linux/arm64 -t $(DOCKER_IMAGE):$(VERSION) --load .
else
# DOCKER_REGISTRY is set, push to registry
docker buildx build --platform linux/amd64,linux/arm64 -t $(DOCKER_REGISTRY)/$(DOCKER_IMAGE):$(VERSION) --push .
endif
docker-run:
docker compose up -d