-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
30 lines (25 loc) · 1.18 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
DEVTAG = dev-$$USER
REPOSITORY = alonso139
.PHONY: deploy
deploy: build-api-image upload-api-image
-kubectl apply -f kubernetes/cloudlit-services.yaml
-kubectl apply -f kubernetes/cloudlit-configmap.yaml
-kubectl apply -f kubernetes/cloudlit-deploy.yaml
-kubectl apply -f kubernetes/cloudlit-autoscaling.yaml
-kubectl set image deployment/cloudlit-django-api cloudlit-django-api=$(REPOSITORY)/cloudlit-django-api:$(DEVTAG)
.PHONY: rebuild-api
rebuild-api: build-api-image upload-api-image
-kubectl apply -f kubernetes/cloudlit-autoscaling.yaml
-kubectl apply -f kubernetes/cloudlit-configmap.yaml
-kubectl rollout restart deployment cloudlit-django-api
-kubectl set image deployment/cloudlit-django-api cloudlit-django-api=$(REPOSITORY)/cloudlit-django-api:$(DEVTAG)
.PHONY: upload-api-image
upload-api-image: login-docker
-docker tag cloudlit-django-api:$(DEVTAG) $(REPOSITORY)/cloudlit-django-api:$(DEVTAG)
-docker push $(REPOSITORY)/cloudlit-django-api:$(DEVTAG)
.PHONY: login-docker
login-docker:
-docker login --username alonso139 --password Comofunciona1
.PHONY: build-api-image
build-api-image:
-docker build . --file docker-conf/Dockerfile-django-api --tag cloudlit-django-api:$(DEVTAG)