move deployment in dedicated Makefile
This commit is contained in:
parent
6f2b23d6cf
commit
c624dc51a7
@ -16,3 +16,5 @@ venv
|
|||||||
|
|
||||||
pushpin
|
pushpin
|
||||||
nginx
|
nginx
|
||||||
|
|
||||||
|
.deploy
|
||||||
31
Makefile
31
Makefile
@ -1,9 +1,7 @@
|
|||||||
ROOT_DIR = $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
|
-include .deploy/Makefile
|
||||||
PYTHON = $(ROOT_DIR)venv/bin/python
|
|
||||||
REGISTRY :=
|
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
|
VERSION := 0.1.0
|
||||||
|
|
||||||
format:
|
format:
|
||||||
@ -39,26 +37,3 @@ static:
|
|||||||
run: pushpin-local nginx-local django
|
run: pushpin-local nginx-local django
|
||||||
@docker compose up
|
@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
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user