-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
44 lines (31 loc) · 1.26 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
OWNER := $(shell bash -c 'echo $$USER')
RANDOM := $(shell bash -c 'echo $$RANDOM')
IMAGE := akash-ecosystem
VERSION := $(shell git rev-parse --short HEAD)-$(RANDOM)
PROVIDER := $(shell cat .akash/PROVIDER)
DSEQ := $(shell cat .akash/DSEQ)
deploy: build update-deploy upload-manifest
build: pack publish gen-sdl commit-sdl
pack:
pack build ghcr.io/$(OWNER)/$(IMAGE) --builder heroku/buildpacks:20 --env "NODE_ENV=production"
publish:
docker tag ghcr.io/$(OWNER)/$(IMAGE):latest ghcr.io/$(OWNER)/$(IMAGE):$(VERSION)
docker push ghcr.io/$(OWNER)/$(IMAGE):latest
docker push ghcr.io/$(OWNER)/$(IMAGE):$(VERSION)
gen-sdl:
OWNER=$(OWNER) IMAGE=$(IMAGE) VERSION=$(VERSION) scripts/gen-sdl
run:
docker run -it --rm -e NODE_ENV=production -p 8080:3000 ghcr.io/$(OWNER)/$(IMAGE)
status:
akash provider lease-status --provider $(PROVIDER) --dseq $(shell cat .akash/DSEQ) --from deploy
update-deploy:
akash tx deployment update --dseq $(DSEQ) --from deploy sdl.yml -y
upload-manifest:
akash provider send-manifest --provider $(PROVIDER) --dseq $(DSEQ) --from deploy sdl.yml
commit-sdl:
git add sdl.yml
git commit -sam '(deploy): update sdl to version $(VERSION)'
info:
@echo "DSEQ: $(DSEQ)"
@echo "PROVIDER: $(PROVIDER)"
.PHONY: build pack image push-image gen-sdl