-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (39 loc) · 1.36 KB
/
Copy pathMakefile
File metadata and controls
56 lines (39 loc) · 1.36 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
.PHONY: dev-up dev-down dev-logs backend-shell db-reset clean prod-build prod-up prod-down prod-logs test test-cover test-integration lint lint-frontend lint-backend
dev-up:
docker-compose up -d --build
dev-down:
docker-compose down
dev-logs:
docker-compose logs -f
backend-shell:
docker-compose exec backend sh
db-reset:
docker-compose down -v
docker-compose up -d db
sleep 5
docker-compose exec db psql -U dduser -d dockerdash -c "DROP SCHEMA public CASCADE; CREATE SCHEMA public;"
clean:
docker-compose down -v
docker-compose rm -f
docker image prune -f
test:
cd backend && go test ./... -v -count=1 -timeout 60s
test-cover:
cd backend && go test ./... -coverprofile=coverage.out -timeout 60s && go tool cover -html=coverage.out -o coverage.html && echo "Coverage report generated: coverage.html"
test-integration:
cd backend && go test -tags=integration ./... -v -count=1 -timeout 120s
lint: lint-backend lint-frontend
lint-backend:
cd backend && golangci-lint run ./... --timeout=5m
lint-frontend:
cd frontend && npm run lint
lint-frontend-fix:
cd frontend && npx eslint . --fix
prod-build:
docker-compose -f docker-compose.prod.yaml build
prod-up:
docker-compose -f docker-compose.prod.yaml --env-file .env.production up -d --build
prod-down:
docker-compose -f docker-compose.prod.yaml down
prod-logs:
docker-compose -f docker-compose.prod.yaml logs -f