-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (33 loc) · 1014 Bytes
/
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
31
32
33
34
35
36
37
38
APP = flask-restapi-lbm
test:
@bandit -r . -x '/.venv/','/tests/'
@black .
@flake8 . --exclude .venv
@#pytest -v --disable-warnings
compose:
@docker-compose build
@docker-compose up
setup-dev:
@kind create cluster --config kubernetes/config/config.yaml
@kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
@kubectl wait --namespace ingress-nginx \
--for=condition=ready pod \
--selector=app.kubernetes.io/component=controller \
--timeout=270s
@helm upgrade \
--install \
--set image.tag=5.0.8 \
--set auth.rootPassword="root" \
mongodb kubernetes/charts/mongodb
@kubectl wait \
--for=condition=ready pod \
--selector=app.kubernetes.io/component=mongodb \
--timeout=270s
teardown-dev:
@kind delete clusters kind
deploy-dev:
@docker build -t $(APP):latest .
@kind load docker-image $(APP):latest
@kubectl apply -f kubernetes/manifests
@kubectl rollout restart deploy restapi-flask
dev: setup-dev deploy-dev