-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (45 loc) · 1.05 KB
/
Makefile
File metadata and controls
60 lines (45 loc) · 1.05 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
DOCKER_POSTGRES = postgres:12.7
DOCKER_ALPINE = alpine:3.20.0
DOCKER_RUST = rustdocker/rustfmt_clippy:stable
ENVFILE ?= .env
TESTS ?= ./test/...
.PHONY: db-stop
db-stop:
docker compose stop postgres
.PHONY: db-start
db-start:
docker compose up -d postgres
.PHONY: db-remove
db-remove:
docker compose rm -s -v postgres && docker volume rm go_server_dbdata_12.7
.PHONY: db-migrate
db-migrate:
docker compose up --build db-migrate
.PHONY: db-seed
db-seed:
docker compose up --build db-seed
.PHONY: db-init
db-init:
docker compose up --build db-init
.PHONY: run
run:
cargo run
.PHONY: run-docker
run-docker:
docker compose up --build run
.PHONY: build-docker
build-docker:
docker compose up --build build
.PHONY: test-docker
test-docker:
docker compose up --build test
.PHONY: docs
docs:
redoc-cli build ./docs/main.yaml -o docs.html
.PHONY: lint
lint:
cargo clippy --all-targets --all-features -- -D warnings
.PHONY: lint-docker
lint-docker:
docker compose up --build ci
docker compose run ci cargo clippy --all-targets --all-features -- -D warnings