-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathMakefile
More file actions
64 lines (46 loc) · 2.49 KB
/
Makefile
File metadata and controls
64 lines (46 loc) · 2.49 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
COMMIT_HASH := $(shell git rev-parse --short HEAD)
TAG := ghcr.io/juspay/decision-engine:sha_$(COMMIT_HASH)
DECISION_ENGINE_TAG ?= v1.4
GROOVY_RUNNER_TAG ?= v1.4
docker-build:
docker build --platform=linux/amd64 -t $(TAG) .
docker-run:
docker run --platform=linux/amd64 -v `pwd`/config/docker-configuration.toml:/local/config/development.toml -p 8080:8080 -d $(TAG)
docker-it-run:
docker run --platform=linux/amd64 -v `pwd`/config/docker-configuration.toml:/local/config/development.toml -it $(TAG) /bin/bash
init-mysql-ghcr:
COMPOSE_PROFILES= DECISION_ENGINE_TAG=$(DECISION_ENGINE_TAG) GROOVY_RUNNER_TAG=$(GROOVY_RUNNER_TAG) docker compose --profile mysql-ghcr up -d
init-pg-ghcr:
COMPOSE_PROFILES= DECISION_ENGINE_TAG=$(DECISION_ENGINE_TAG) GROOVY_RUNNER_TAG=$(GROOVY_RUNNER_TAG) docker compose --profile postgres-ghcr up -d
init-mysql-local:
COMPOSE_PROFILES= docker compose --profile mysql-local up -d --build
init-pg-local:
COMPOSE_PROFILES= docker compose --profile postgres-local up -d --build
run-mysql-ghcr:
COMPOSE_PROFILES= DECISION_ENGINE_TAG=$(DECISION_ENGINE_TAG) GROOVY_RUNNER_TAG=$(GROOVY_RUNNER_TAG) docker compose --profile mysql-ghcr up -d open-router-mysql-ghcr
run-pg-ghcr:
COMPOSE_PROFILES= DECISION_ENGINE_TAG=$(DECISION_ENGINE_TAG) GROOVY_RUNNER_TAG=$(GROOVY_RUNNER_TAG) docker compose --profile postgres-ghcr up -d open-router-pg-ghcr
run-mysql-local:
COMPOSE_PROFILES= docker compose --profile mysql-local up -d --build open-router-mysql-local
run-pg-local:
COMPOSE_PROFILES= docker compose --profile postgres-local up -d --build open-router-pg-local
init-pg-monitor:
COMPOSE_PROFILES= DECISION_ENGINE_TAG=$(DECISION_ENGINE_TAG) GROOVY_RUNNER_TAG=$(GROOVY_RUNNER_TAG) docker compose --profile postgres-ghcr --profile monitoring up -d
init-local-pg-monitor:
COMPOSE_PROFILES= docker compose --profile postgres-local --profile monitoring up -d --build
update-config:
COMPOSE_PROFILES= docker compose --profile mysql-ghcr run --rm routing-config
stop:
docker compose down
reset-analytics-clickhouse:
COMPOSE_PROFILES= docker compose stop clickhouse kafka kafka-init || true
COMPOSE_PROFILES= docker compose rm -sf clickhouse kafka-init || true
docker volume rm $$(basename "$$(pwd)")_clickhouse-data || true
COMPOSE_PROFILES= docker compose --profile analytics-clickhouse up -d kafka kafka-init clickhouse
# Backward-compatible aliases
init: init-mysql-ghcr
init-pg: init-pg-ghcr
run: run-mysql-ghcr
init-local: init-mysql-local
init-local-pg: init-pg-local
run-local: run-mysql-local