-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
30 lines (22 loc) · 873 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
.PHONY: help build prepare
.DEFAULT_GOAL := help
prepare:
ifndef VERSION
$(error You must set VERSION variable to build local image)
endif
./build_opal_bundle.sh
run-prepare:
ifndef API_KEY
$(error You must set API_KEY variable to run pdp locally)
endif
ifndef VERSION
$(error You must set VERSION variable to run pdp locally)
endif
build-amd64: prepare
@docker buildx build --platform linux/amd64 -t permitio/pdp-v2:$(VERSION) . --load
build-arm64: prepare
@docker buildx build --build-arg ALLOW_MISSING_FACTSTORE=false --platform linux/arm64 -t permitio/pdp-v2:$(VERSION) . --load
run: run-prepare
@docker run -it --rm -p 7766:7000 --env PDP_API_KEY=$(API_KEY) --env PDP_DEBUG=true permitio/pdp-v2:$(VERSION)
run-on-background: run-prepare
@docker run -it --rm -d -p 7766:7000 --env PDP_API_KEY=$(API_KEY) --env PDP_DEBUG=true permitio/pdp-v2:$(VERSION)