Migrate ECR to forgejo container registry

This commit is contained in:
Ian Keane 2026-08-22 17:56:03 -04:00
parent bd1c17b09b
commit bbea068e12
7 changed files with 47 additions and 70 deletions

View file

@ -1,6 +1,9 @@
.PHONY: init plan apply destroy clean kubeconfig talosconfig argocd-password bootstrap decrypt post-apply build-mcp-auth-proxy
SECRET ?= dumpnet
FORGEJO_REGISTRY ?= forge.keane.sh
FORGEJO_USER ?= ian
MCP_AUTH_PROXY_IMAGE=$(FORGEJO_REGISTRY)/$(FORGEJO_USER)/mcp-auth-proxy
TF_DIR=terraform
SOPS_FILES=controlplane.yaml worker.yaml talosconfig
@ -41,11 +44,12 @@ bootstrap:
# Images
build-mcp-auth-proxy:
$(eval ECR=$(shell cd $(TF_DIR) && terraform output -raw ecr_registry))
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin $(ECR)
docker build -t $(ECR):latest images/mcp-auth-proxy/
docker push $(ECR):latest
@echo "Pushed mcp-auth-proxy to $(ECR):latest"
@echo "==> Logging into Forgejo registry..."
$(eval REGISTRY_TOKEN=$(shell aws secretsmanager get-secret-value --secret-id $(SECRET) --query SecretString --output text | python3 -c "import sys,json; print(json.load(sys.stdin)['forgejo']['registry_token'])"))
echo "$(REGISTRY_TOKEN)" | docker login $(FORGEJO_REGISTRY) --username $(FORGEJO_USER) --password-stdin
docker build -t $(MCP_AUTH_PROXY_IMAGE):latest images/mcp-auth-proxy/
docker push $(MCP_AUTH_PROXY_IMAGE):latest
@echo "Pushed mcp-auth-proxy to $(MCP_AUTH_PROXY_IMAGE):latest"
# Credentials
talosconfig: