diff --git a/.dockerignore b/.dockerignore index 0b7a35f..4560ad6 100644 --- a/.dockerignore +++ b/.dockerignore @@ -15,4 +15,6 @@ venv *.pid pushpin -nginx \ No newline at end of file +nginx + +.deploy \ No newline at end of file diff --git a/Makefile b/Makefile index 94a4bfd..b81bef5 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,7 @@ -ROOT_DIR = $(dir $(realpath $(lastword $(MAKEFILE_LIST)))) -PYTHON = $(ROOT_DIR)venv/bin/python -REGISTRY := +-include .deploy/Makefile + +PYTHON = venv/bin/python -GIT_BRANCH = $(shell git rev-parse --abbrev-ref HEAD) -GIT_SHA = $(shell git rev-parse --short HEAD) VERSION := 0.1.0 format: @@ -39,26 +37,3 @@ static: run: pushpin-local nginx-local django @docker compose up -show: - @echo "branch: $(GIT_BRANCH)" - @echo "version: $(VERSION)" - @echo "registry: $(REGISTRY)" - -deploy: pushpin-local django static - @cp -pr static .deploy/prod/ - @cp -pr static .deploy/stage/ - - @docker tag pushpin:mumui $(REGISTRY)/pushpin:mumui - @docker push $(REGISTRY)/pushpin:mumui - - @docker tag mumui:local $(REGISTRY)/mumui:$(VERSION) - @docker push $(REGISTRY)/mumui:$(VERSION) - - @ngxsd mumui --env prod --var port=8090 --var version=$(VERSION) - @ngxsd mumui --env stage --var port=8090 --nginx - -destroy: - @ngxsd mumui --env prod --destroy - @ngxsd mumui --env stage --destroy --nginx - -