forked from IniZio/tellchima
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
69 lines (56 loc) · 1.17 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
GIT_SHORT_SHA ?= $(shell git rev-parse --short=8 HEAD)
IMAGE_PLATFORM ?= amd64
IMAGE_REGISTRY ?= gcr.io/oursky-kube
IMAGE_TAG ?= $(IMAGE_REGISTRY)/tellchima:$(GIT_SHORT_SHA)
K8S_NAMESPACE ?= tellchima2
.PHONY: setup-local
setup-local:
asdf plugin add nodejs || true
asdf plugin add pnpm || true
asdf install
pnpm install
cp -r .env.example .env
.PHONY: dev
dev:
make generate
make migrate
pnpm start:dev
.PHONY: ngrok
ngrok:
ngrok http 3000
.PHONY: dep
dep:
pnpm install
.PHONY: generate
generate:
pnpm generate
.PHONY: migrate
migrate:
pnpm migrate
.PHONY: create-migration
create-migration:
pnpm create-migration -- -n $(NAME)
.PHONY: cli-publish-and-discard
cli-publish-and-discard:
pnpm cli:publish-and-discard
.PHONY: docker-image
docker-image:
docker build \
--file ./Dockerfile \
--platform $(IMAGE_PLATFORM) \
--tag $(IMAGE_TAG) \
.
.PHONY: push-docker-image
push-docker-image:
docker push $(IMAGE_TAG)
.PHONY: deploy
deploy:
helm upgrade \
--install \
--namespace $(K8S_NAMESPACE) \
--set-string appVersion="$(GIT_SHORT_SHA)" \
--values ./helm/values.yaml \
--values ./helm/encrypted.yaml \
--timeout 10m \
--wait \
tellchima ./helm