-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (29 loc) · 1.09 KB
/
Makefile
File metadata and controls
41 lines (29 loc) · 1.09 KB
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
.PHONY: help build prepare build-amd64 build-arm64 cargo-run
.DEFAULT_GOAL := help
VERSION ?= next
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 --platform linux/arm64 -t permitio/pdp-v2:$(VERSION) . --load
build: prepare
@docker buildx build -t permitio/pdp-v2:$(VERSION) . --load
build-latest: prepare
@docker buildx build -t permitio/pdp-v2:latest . --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)
cargo-run:
cargo run --bin pdp-server --package pdp-server -- --port 7766