forked from m1guelpf/tinyvector
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
76 lines (54 loc) · 1.27 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
ifeq (1,${MACOS_ARM})
TARGET:=--target=aarch64-apple-darwin
endif
ifeq (1,${LINUX_ARM})
TARGET:=--target=aarch64-unknown-linux-gnu
endif
all: check build
lint:
cargo clippy -- -D warnings
format:
cargo fmt --all
outdated:
cargo outdated --exit-code 1
audit:
cargo audit
cargo pants
check: lint format outdated
upgrade:
cargo update
cargo upgrade --incompatible
build:
cargo build --release $(TARGET)
start:
target/release/litevec &
ping:
curl -s -w "%{http_code}" http://localhost:8000/ping
stop:
curl -X POST -s -w "%{http_code}" http://localhost:8000/shutdown
clean:
rm -rf target
docker: docker-lint docker-build
docker-lint:
docker run --rm -i \
-v ${PWD}/.hadolint.yaml:/bin/hadolint.yaml \
-e XDG_CONFIG_HOME=/bin hadolint/hadolint \
< Dockerfile
docker-build:
docker build -t litevec .
docker-start:
docker run --rm -dt -p 8000:8000 -v ${PWD}/storage:/storage \
--name litevec litevec
docker-enter:
docker run --rm -it -p 8000:8000 -v ${PWD}/storage:/storage \
--entrypoint sh litevec
docker-kill:
docker container kill litevec
docker-log:
docker logs litevec
docker-up:
IMAGE_HUB= docker compose -f docker-compose.yml up -d
docker-down:
IMAGE_HUB= docker compose -f docker-compose.yml down
docker-log1:
docker logs litevec-litevec-1