-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (40 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
45
46
47
48
49
.PHONY: g generate
g generate:
make -C thirdparty g
### Docker Compose ###
export COMPOSE_PROJECT_NAME=temporal
export CASSANDRA_VERSION=3.11.9
export ELASTICSEARCH_VERSION=7.16.2
export MYSQL_VERSION=8
export TEMPORAL_VERSION=1.22.4
export TEMPORAL_UI_VERSION=2.22.3
export POSTGRESQL_VERSION=13
export POSTGRES_PASSWORD=temporal
export POSTGRES_USER=temporal
export POSTGRES_DEFAULT_PORT=5432
export OPENSEARCH_VERSION=2.5.0
.PHONY: up
up:
$(MAKE) build
$(MAKE) build-thirdparty
docker compose up
.PHONY: helloworld-worker
helloworld-worker:
go run job/helloworld/worker/main.go
.PHONY: helloworld-starter
helloworld-starter:
go run job/helloworld/starter/main.go
.PHONY: broadcast-starter
broadcast-starter:
go run main.go broadcast
APP_BIN := ./build/bin/worker
.PHONY: build
# go binary supports scratch base image (kaniko)
export CGO_ENABLED=0
build: $(APP_BIN)
$(APP_BIN): $(shell find build/dockerfile -type f) $(shell find job -type f) $(shell find service -type f) $(shell find thirdparty/client -type f) go.mod go.sum main.go
go build -o $(APP_BIN)
docker build -t temporal-worker -f ./build/dockerfile/Dockerfile-worker .
docker build -t temporal-builder-worker -f ./build/dockerfile/Dockerfile-builder --no-cache .
build-thirdparty:
make -C thirdparty build