move deployment in dedicated Makefile

This commit is contained in:
rmanach 2025-11-04 11:14:32 +01:00
parent 6f2b23d6cf
commit c624dc51a7
2 changed files with 6 additions and 29 deletions

View File

@ -16,3 +16,5 @@ venv
pushpin
nginx
.deploy

View File

@ -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