forked from wundergraph/cosmo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
129 lines (95 loc) · 3.67 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
all: dev-setup
setup-build-tools:
go install github.com/bufbuild/buf/cmd/[email protected]
go install google.golang.org/protobuf/cmd/[email protected]
go install connectrpc.com/connect/cmd/[email protected]
setup-dev-tools: setup-build-tools
go install github.com/amacneil/dbmate/[email protected]
go install honnef.co/go/tools/cmd/[email protected]
go install github.com/yannh/kubeconform/cmd/[email protected]
go install github.com/norwoodj/helm-docs/cmd/[email protected]
prerequisites: setup-dev-tools
go version
pnpm -v
node -v
docker -v
dbmate -v
infra-up: dc-dev
infra-down:
docker compose -f docker-compose.yml down --remove-orphans
infra-build:
docker compose -f docker-compose.yml build
infra-restart:
docker compose -f docker-compose.yml down && make infra-up
infra-down-v:
docker compose -f docker-compose.yml down --remove-orphans -v
seed:
pnpm -r run --filter './controlplane' seed
create-cli-demo:
./scripts/create-cli-demo.sh
create-docker-demo:
./scripts/create-docker-demo.sh
create-demo:
./scripts/create-local-demo.sh
delete-demo:
./scripts/delete-local-demo.sh
dev-setup: prerequisites
pnpm install
pnpm generate
make generate-go
make infra-up
pnpm -r run --filter '!studio' build
dev-setup-no-infra: prerequisites
pnpm install
pnpm generate
make generate-go
pnpm -r run --filter '!studio' build
build-pnpm:
pnpm install
pnpm generate
pnpm -r run --filter '!studio' build
migrate:
pnpm -r run --filter './controlplane' migrate
generate:
pnpm generate
make generate-go
generate-go:
rm -rf router/gen && buf generate --path proto/wg/cosmo/node --path proto/wg/cosmo/common --path proto/wg/cosmo/graphqlmetrics --template buf.router.go.gen.yaml
rm -rf graphqlmetrics/gen && buf generate --path proto/wg/cosmo/graphqlmetrics --path proto/wg/cosmo/common --template buf.graphqlmetrics.go.gen.yaml
start-cp:
pnpm -r run --filter './controlplane' dev
start-studio:
pnpm -r run --filter './studio' dev
start-router:
(cd router && make dev)
dc-dev:
docker compose --file docker-compose.yml up --remove-orphans --detach --build
dc-stack:
docker compose --file docker-compose.cosmo.yml up --remove-orphans --detach
dc-stack-build:
docker compose --file docker-compose.cosmo.yml up --build --remove-orphans --detach
full-demo-up:
docker compose -f docker-compose.full.yml --profile default up --build --remove-orphans --detach && ./scripts/setup-fulldemo.sh
full-demo-down:
docker compose -f docker-compose.full.yml --profile default --profile router --profile subgraphs down --remove-orphans -v
dc-federation-demo:
docker compose -f docker-compose.full.yml --profile default --profile router --profile subgraphs up --remove-orphans --detach
dc-subgraphs-demo:
OTEL_AUTH_TOKEN=$(OTEL_AUTH_TOKEN) docker compose -f docker-compose.full.yml --profile subgraphs up --remove-orphans --detach --build
dc-subgraphs-demo-down:
docker compose -f docker-compose.full.yml --profile subgraphs down --remove-orphans
docker-build-local:
docker compose --file docker-compose.cosmo.yml build --no-cache
docker-push-local:
docker compose --file docker-compose.cosmo.yml push --no-cache
docker-build-minikube: docker-build-local
minikube image load ghcr.io/wundergraph/cosmo/studio:latest & \
minikube image load ghcr.io/wundergraph/cosmo/controlplane:latest & \
minikube image load ghcr.io/wundergraph/cosmo/otelcollector:latest & \
minikube image load ghcr.io/wundergraph/cosmo/router:latest & \
minikube image load ghcr.io/wundergraph/cosmo/graphqlmetrics:latest & \
minikube image load ghcr.io/wundergraph/cosmo/keycloak:latest & \
minikube image load ghcr.io/wundergraph/cosmo/cdn:latest
minikube cache reload
run-subgraphs-local:
cd demo && go run cmd/all/main.go