-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
54 lines (40 loc) · 1.34 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
.PHONY: help lint up down build api-logs test-unit test-e2e install mongo-init seed seed-refresh
GREEN := \033[0;32m
NC := \033[0m
help:
@echo "Available commands:"
@echo "$(GREEN) lint $(NC)- Run linting"
@echo "$(GREEN) up $(NC)- (Docker) Start all services in detached mode"
@echo "$(GREEN) down $(NC)- (Docker) Stop all services"
@echo "$(GREEN) build $(NC)- (Docker) Build and start all services in detached mode"
@echo "$(GREEN) api-logs $(NC)- (Docker) Tail logs for the demo_api container"
@echo "$(GREEN) unit-test $(NC)- Run unit tests"
@echo "$(GREEN) e2e-test $(NC)- Run end-to-end tests"
@echo "$(GREEN) install $(NC)- Install dependencies inside the api container"
@echo "$(GREEN) mongo-init $(NC)- Initialize MongoDB using the setup script"
@echo "$(GREEN) seed $(NC)- Seed the database (default seeding)"
@echo "$(GREEN) seed-refresh$(NC)- Refresh the database (removes all data and re-seeds)"
lint:
pnpm run lint
up:
docker compose up -d
down:
docker compose down
build:
docker compose up -d --build
api-logs:
docker logs demo_api -f --tail 10000
unit-test:
pnpm test
e2e-test:
pnpm test:e2e
architect-test:
pnpm test:architect
install:
docker compose exec api pnpm i
mongo-init:
sh ./mongo-setup/setup.sh
seed:
pnpm seed
seed-refresh:
pnpm seed:refresh