-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (39 loc) · 965 Bytes
/
Copy pathMakefile
File metadata and controls
55 lines (39 loc) · 965 Bytes
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
.PHONY: help infra download migrate app up down stop restart build pull logs ps clean reset
COMPOSE ?= docker compose
INFRA_SERVICES ?= db redis jaeger
APP_SERVICE ?= app
MIGRATION_SERVICE ?= neo4j-migrations
DOWNLOADER_SERVICE ?= osm-downloader
help:
@awk 'BEGIN {FS = ":.*## "; printf "Available targets:\n"} /^[a-zA-Z0-9_-]+:.*## / {printf " %-16s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
infra:
$(COMPOSE) up -d $(INFRA_SERVICES)
download:
$(COMPOSE) up --wait $(DOWNLOADER_SERVICE)
migrate:
$(COMPOSE) run --rm $(MIGRATION_SERVICE)
app:
$(COMPOSE) up -d $(APP_SERVICE)
up:
$(MAKE) infra
$(MAKE) download
$(MAKE) migrate
$(MAKE) app
down:
$(COMPOSE) down
stop:
$(COMPOSE) stop
restart:
$(COMPOSE) restart $(APP_SERVICE) $(INFRA_SERVICES)
build:
$(COMPOSE) build
pull:
$(COMPOSE) pull
logs:
$(COMPOSE) logs -f --tail=100 $(SERVICE)
ps:
$(COMPOSE) ps
clean:
$(COMPOSE) down --remove-orphans
reset:
$(COMPOSE) down -v --remove-orphans