-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
62 lines (47 loc) · 1.08 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
SHELL ?= /usr/bin/env bash
UID := $(shell id -u)
GID := $(shell id -g)
.PHONY: default
default: build
.PHONY: all-deps-graph
all-deps-graph:
cargo depgraph --all-deps | dot -Tpng > all-deps-graph.png
.PHONY: ws-deps-graph
ws-deps-graph:
cargo depgraph --workspace-only | dot -Tpng > ws-deps-graph.png
.PHONY: test
test:
cargo test
.PHONY: build
build:
cargo build
.PHONY: release
release:
cargo build --release
.PHONY: image
image: build
docker build -t deadjokes-api .
.PHONY: run
run:
cargo run
.PHONY: watch
watch:
cargo watch -x run
.PHONY: start
start: infra
$(MAKE) run
.PHONY: elastic
elastic:
docker compose -f ./docker-compose.elastic.yaml up -d
.PHONY: db
db:
docker compose -f ./docker-compose.db.yaml up -d
.PHONY: infra
infra:
docker compose -f ./docker-compose.elastic.yaml -f ./docker-compose.db.yaml up -d
.PHONY: up
up:
docker compose -f ./docker-compose.elastic.yaml -f ./docker-compose.db.yaml -f ./docker-compose.api.yaml up -d
.PHONY: down
down:
docker compose -f ./docker-compose.elastic.yaml -f ./docker-compose.db.yaml -f ./docker-compose.api.yaml down