From df55484e5af3749b6b830404026ba195ce51c94c Mon Sep 17 00:00:00 2001 From: Ethan Paul Date: Fri, 12 Apr 2024 14:10:32 -0400 Subject: [PATCH] !LOCAL Add makefile for automating build and upload --- Makefile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..96c416e --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +REPOSITORY_PROXY = vcs.enp.one/skylab/nxcloud-proxy +REPOSITORY_SERVER = vcs.enp.one/skylab/nxcloud-server + + +.PHONY: help docs +# source: https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html +help: ## List Makefile targets + $(info Makefile documentation) + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-10s\033[0m %s\n", $$1, $$2}' + + +image: ## Build image + podman build ./php-fpm --tag $(REPOSITORY_SERVER):latest + podman build ./nginx --tag $(REPOSITORY_PROXY):latest + +push: image ## Build and publish image + podman login $(shell echo $(REPOSITORY_SERVER) | cut -d '/' -f 1) + podman push $(REPOSITORY_SERVER):latest + podman login $(shell echo $(REPOSITORY_PROXY) | cut -d '/' -f 1) + podman push $(REPOSITORY_PROXY):latest