-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
74 lines (56 loc) · 1.38 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
.PHONY: all
all: up
.PHONY: re
re: down build up
.PHONY: up
up:
docker compose up -d
.PHONY: down
down:
docker compose down
.PHONY: build
build:
docker compose build
.PHONY: rebuild
rebuild:
docker compose build --no-cache
.PHONY: clean
clean:
docker compose -f compose.yml -f compose.dev.yml down --rmi all --volumes --remove-orphans
.PHONY: test
test: build unit e2e front
.PHONY: front
front:
docker compose -f compose.yml -f compose.dev.yml run frontend npm run build
.PHONY: e2e
e2e:
# E2E tests for backend
docker compose -f compose.yml -f compose.dev.yml run backend yarn test:e2e
.PHONY: unit
unit:
docker compose -f compose.yml -f compose.dev.yml run backend yarn test
.PHONY: dev
dev: build
docker compose -f compose.yml -f compose.dev.yml up -d
.PHONY: prod
prod:
docker system prune -f
docker compose -f compose.yml -f compose.prod.yml build
docker compose -f compose.yml -f compose.prod.yml up -d
.PHONY: fmt
fmt:
npx prettier --write frontend backend
.PHONY: lint
lint:
npm --prefix frontend run lint
yarn --cwd backend lint
.PHONY: check
check: fmt lint
.PHONY: update
update:
docker compose -f compose.yml -f compose.dev.yml run frontend npx npm-check-updates -i
docker compose -f compose.yml -f compose.dev.yml run backend yarn upgrade-interactive
POSTGRES_USER = postgres
POSTGRES_DB = postgres
db:
docker compose exec db psql -U $(POSTGRES_USER) $(POSTGRES_DB)