-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
69 lines (46 loc) · 2.2 KB
/
Copy pathMakefile
File metadata and controls
69 lines (46 loc) · 2.2 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
.PHONY: help build up down restart logs exec status clean deploy teardown template docker-build docker-push docker-login k8s-exec k8s-logs
# Load .env file if it exists.
-include .env
export
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}'
build: ## Build containers
docker compose build
up: ## Start the stack
docker compose up --build -d
down: ## Stop the stack
docker compose down
restart: ## Restart the stack
docker compose down
$(MAKE) up
logs: ## Tail container logs
docker compose logs -f
exec: ## Shell into k8s claude-code: make exec ID=myproject
kubectl exec -it deploy/rda-$(ID) -c claude-code -n rda-$(ID) -- bash
dev-exec: ## Shell into local docker-compose claude-code
docker compose exec claude-code bash
status: ## Show running containers
docker compose ps
clean: ## Stop and remove volumes
docker compose down -v
# --- Kubernetes / Helm ---
deploy: ## Deploy to k8s: make deploy ID=myproject REPO=https://...
./scripts/deploy.sh $(ID) $(REPO) $(BRANCH)
teardown: ## Tear down a k8s deployment: make teardown ID=myproject
./scripts/teardown.sh $(ID)
k8s-exec: ## Shell into k8s claude-code: make k8s-exec ID=myproject
kubectl exec -it deploy/rda-$(ID) -c claude-code -n rda-$(ID) -- bash
k8s-logs: ## Tail k8s pod logs: make k8s-logs ID=myproject
kubectl logs deploy/rda-$(ID) --all-containers -n rda-$(ID) -f
template: ## Render chart templates without deploying: make template ID=myproject REPO=https://...
./scripts/deploy.sh $(ID) $(REPO) $(BRANCH) --dry-run
# --- Docker images ---
docker-login: ## Login to GHCR
echo $(GITHUB_DOCKER_TOKEN) | docker login ghcr.io -u $(GITHUB_USERNAME) --password-stdin
docker-build: ## Build container images for GHCR
docker buildx build --platform linux/amd64 -t $(REGISTRY)/rda-claude-code:latest ./containers/claude-code --load
docker buildx build --platform linux/amd64 -t $(REGISTRY)/rda-node-pnpm:latest ./containers/node-pnpm --load
docker-push: ## Push container images to GHCR
docker push $(REGISTRY)/rda-claude-code:latest
docker push $(REGISTRY)/rda-node-pnpm:latest
docker-build-push: docker-build docker-push ## Build and push images