-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
70 lines (55 loc) · 1.99 KB
/
Makefile
File metadata and controls
70 lines (55 loc) · 1.99 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
61
62
63
64
65
66
67
68
69
70
DOCKER_COMPOSE = docker-compose --env-file .env -f infra/docker/docker-compose.yml
frontend:
@echo "Starting frontend service locally..."
cd frontend && bun run dev
infra-up:
@echo "Starting infrastructure services..."
$(DOCKER_COMPOSE) up -d redis
all: infra-up slm
@echo "Starting backend service locally..."
cd backend/usermanagement-service && uv run uvicorn main:app --reload --host 0.0.0.0 --port 8000
deps:
@echo "Installing dependencies with UV..."
cd backend/usermanagement-service && uv sync
certs:
@echo "Generating SSL certificates..."
@chmod +x infra/scripts/generate-certs.sh
@./infra/scripts/generate-certs.sh
certs-clean:
@echo "Removing existing certificates..."
@rm -rf infra/certs
@echo "Certificates removed. Run 'make certs' to regenerate."
deploy: certs
@echo "Deploying all Docker images..."
$(DOCKER_COMPOSE) up --build -d
slm:
@echo "Starting to create SLM policies"
@chmod +x infra/scripts/setup-snapshot-repository.sh
@./infra/scripts/setup-snapshot-repository.sh
@chmod +x infra/scripts/setup-slm-policy.sh
@./infra/scripts/setup-slm-policy.sh
down:
@echo "Stopping all services..."
$(DOCKER_COMPOSE) down
logs:
$(DOCKER_COMPOSE) logs -f
tests:
@echo "Running tests for usermanagement-service..."
cd backend/usermanagement-service && uv sync --extra test && uv run pytest
@echo "Running tests for tournament-service..."
cd backend/tournament-service && uv sync --extra test && uv run pytest
@echo "Running tests for game-service..."
cd backend/game-service && go test ./... -v -race
@echo "Running tests for friends-service..."
cd backend/friends-service && ./mvnw test
lint:
@echo "Linting code with Ruff..."
cd backend/usermanagement-service && uv run ruff check .
format:
@echo "Formatting code with Ruff..."
cd backend/usermanagement-service && uv run ruff format .
clean: down
@echo "Removing volumes and cleaning up..."
$(DOCKER_COMPOSE) down -v
docker system prune -f
.PHONY: deps all certs certs-clean deploy down logs tests lint format clean