Initial commit: BunnyCDN MCP server with K8s deployment
- FastMCP server with 12 tools (pullzone, cache, statistics, shield) - Dockerfile with multi-stage build (python:3.11-slim + uv) - K8s manifests (Deployment + Service) - Gitea Actions CI/CD pipeline (build → push → deploy)
This commit is contained in:
41
.gitea/workflows/ci.yml
Normal file
41
.gitea/workflows/ci.yml
Normal file
@@ -0,0 +1,41 @@
|
||||
name: CI/CD
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Login to Gitea Registry
|
||||
run: echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login gitea.anvil.it.com -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin
|
||||
|
||||
- name: Build and push Docker image
|
||||
run: |
|
||||
IMAGE=gitea.anvil.it.com/kaffa/bunnycdn-mcp
|
||||
TAG=${GITHUB_SHA::8}
|
||||
docker build \
|
||||
--tag ${IMAGE}:${TAG} \
|
||||
--tag ${IMAGE}:latest \
|
||||
.
|
||||
docker push ${IMAGE}:${TAG}
|
||||
docker push ${IMAGE}:latest
|
||||
|
||||
- name: Deploy to K8s
|
||||
run: |
|
||||
mkdir -p ~/.kube
|
||||
echo "${{ secrets.KUBECONFIG }}" | base64 -d > ~/.kube/config
|
||||
chmod 600 ~/.kube/config
|
||||
|
||||
IMAGE=gitea.anvil.it.com/kaffa/bunnycdn-mcp
|
||||
TAG=${GITHUB_SHA::8}
|
||||
|
||||
kubectl apply -f k8s/
|
||||
kubectl set image deployment/bunnycdn-mcp \
|
||||
bunnycdn-mcp=${IMAGE}:${TAG} \
|
||||
-n default
|
||||
kubectl rollout status deployment/bunnycdn-mcp \
|
||||
-n default --timeout=120s
|
||||
Reference in New Issue
Block a user