-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (54 loc) · 1.87 KB
/
Makefile
File metadata and controls
63 lines (54 loc) · 1.87 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
.PHONY: help build build-push login dev clean
# Variables
IMAGE_NAME := ghcr.io/ardaglobal/fastmcp-proxy
TAG := latest
PLATFORM := linux/amd64
help:
@echo "Available commands:"
@echo " make build - Build Docker image for linux/amd64"
@echo " make build-push - Build and push Docker image to GHCR"
@echo " make login - Login to GitHub Container Registry"
@echo " make dev - Start local development with docker compose"
@echo " make clean - Stop and remove containers"
@echo " make generate-api-key - Generate a new secure API key"
# Login to GitHub Container Registry
# Usage: make login (will prompt for GitHub token)
login:
@echo "Logging into GitHub Container Registry..."
@echo "You'll be prompted for your GitHub Personal Access Token"
@docker login ghcr.io -u $(shell git config user.name || echo "username")
# Build the Docker image for linux/amd64 platform
build:
@echo "Building Docker image for $(PLATFORM)..."
docker buildx build \
--platform $(PLATFORM) \
-t $(IMAGE_NAME):$(TAG) \
-f Dockerfile \
--load \
.
# Build and push the Docker image to GHCR
build-push:
@echo "Building and pushing Docker image to $(IMAGE_NAME):$(TAG)..."
docker buildx build \
--platform $(PLATFORM) \
-t $(IMAGE_NAME):$(TAG) \
-f Dockerfile \
--push \
.
@echo "✅ Successfully pushed $(IMAGE_NAME):$(TAG)"
# Local development using docker compose
dev:
@echo "Starting local development environment..."
docker compose up --build
# Stop and clean up containers
clean:
@echo "Cleaning up containers..."
docker compose down
@echo "Removing dangling images..."
docker image prune -f
# Generate a new API key in the format ardamcp_<uuid>
generate-api-key:
@echo "Generated API Key:"
@python3 -c "import uuid; print(f'ardamcp_{uuid.uuid4()}')"
@echo ""
@echo "Add this key to your api-keys.yaml file with appropriate configuration."