A container registry that uses the AT Protocol for manifest storage and S3 for blob storage. atcr.io
docker container atproto go
72
fork

Configure Feed

Select the types of activity you want to include in your feed.

at label-service 135 lines 4.5 kB view raw
1# ATCR Makefile 2# Build targets for the ATProto Container Registry 3 4.PHONY: all build build-appview build-hold build-credential-helper build-oauth-helper \ 5 generate test test-race test-verbose lint lex-lint clean help install-credential-helper \ 6 develop develop-detached develop-down dev \ 7 docker docker-appview docker-hold docker-scanner 8 9.DEFAULT_GOAL := help 10 11help: ## Show this help message 12 @echo "ATCR Build Targets:" 13 @echo "" 14 @awk 'BEGIN {FS = ":.*##"; printf ""} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-28s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) 15 16all: generate build ## Generate assets and build all binaries (default) 17 18# Generated asset files 19GENERATED_ASSETS = \ 20 pkg/appview/public/js/htmx.min.js \ 21 pkg/appview/public/js/lucide.min.js \ 22 pkg/appview/licenses/spdx-licenses.json 23 24generate: $(GENERATED_ASSETS) ## Run go generate to download vendor assets 25 26$(GENERATED_ASSETS): 27 @echo "→ Generating vendor assets and code..." 28 go generate ./... 29 30##@ Build Targets 31 32build: build-appview build-hold build-credential-helper ## Build all binaries 33 34build-appview: $(GENERATED_ASSETS) ## Build appview binary only 35 @echo "→ Building appview..." 36 @mkdir -p bin 37 go build -o bin/atcr-appview ./cmd/appview 38 39build-hold: $(GENERATED_ASSETS) ## Build hold binary only 40 @echo "→ Building hold..." 41 @mkdir -p bin 42 go build -o bin/atcr-hold ./cmd/hold 43 44build-credential-helper: ## Build credential helper only 45 @echo "→ Building credential helper..." 46 @mkdir -p bin 47 go build -o bin/docker-credential-atcr ./cmd/credential-helper 48 49build-oauth-helper: ## Build OAuth helper only 50 @echo "→ Building OAuth helper..." 51 @mkdir -p bin 52 go build -o bin/oauth-helper ./cmd/oauth-helper 53 54##@ Test Targets 55 56test: ## Run all tests 57 @echo "→ Running tests..." 58 go test -cover ./... 59 60test-race: ## Run tests with race detector 61 @echo "→ Running tests with race detector..." 62 go test -race ./... 63 64test-verbose: ## Run tests with verbose output 65 @echo "→ Running tests with verbose output..." 66 go test -v ./... 67 68##@ Quality Targets 69 70.PHONY: check-golangci-lint 71check-golangci-lint: 72 @which golangci-lint > /dev/null || (echo "→ Installing golangci-lint..." && go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest) 73 74lint: check-golangci-lint ## Run golangci-lint 75 @echo "→ Running golangci-lint..." 76 golangci-lint run ./... 77 78lex-lint: ## Lint ATProto lexicon schemas 79 goat lex lint ./lexicons/ 80 81##@ Install Targets 82 83install-credential-helper: build-credential-helper ## Install credential helper to /usr/local/sbin 84 @echo "→ Installing credential helper to /usr/local/sbin..." 85 install -m 755 bin/docker-credential-atcr /usr/local/sbin/docker-credential-atcr 86 @echo "✓ Installed docker-credential-atcr to /usr/local/sbin/" 87 88##@ Development Targets 89 90dev: $(GENERATED_ASSETS) ## Run AppView locally with Air hot reload 91 @which air > /dev/null || (echo "→ Installing Air..." && go install github.com/air-verse/air@latest) 92 air -c .air.toml 93 94##@ Docker Targets 95 96docker: docker-appview docker-hold docker-scanner ## Build all Docker images 97 98docker-appview: ## Build appview Docker image 99 @echo "→ Building appview Docker image..." 100 docker build -f Dockerfile.appview -t atcr.io/atcr.io/appview:latest . 101 102docker-hold: ## Build hold Docker image 103 @echo "→ Building hold Docker image..." 104 docker build -f Dockerfile.hold -t atcr.io/atcr.io/hold:latest . 105 106docker-scanner: ## Build scanner Docker image 107 @echo "→ Building scanner Docker image..." 108 docker build -f Dockerfile.scanner -t atcr.io/atcr.io/scanner:latest . 109 110develop: ## Build and start docker-compose with Air hot reload 111 @echo "→ Building Docker images..." 112 docker-compose build 113 @echo "→ Starting docker-compose with hot reload..." 114 docker-compose up 115 116develop-detached: ## Build and start docker-compose with hot reload (detached) 117 @echo "→ Building Docker images..." 118 docker-compose build 119 @echo "→ Starting docker-compose with hot reload (detached)..." 120 docker-compose up -d 121 @echo "✓ Services started in background with hot reload" 122 @echo " AppView: http://localhost:5000" 123 @echo " Hold: http://localhost:8080" 124 125develop-down: ## Stop docker-compose services 126 @echo "→ Stopping docker-compose..." 127 docker-compose down 128 129##@ Utility Targets 130 131clean: ## Remove built binaries and generated assets 132 @echo "→ Cleaning build artifacts..." 133 rm -rf bin/ 134 rm -f pkg/appview/licenses/spdx-licenses.json 135 @echo "✓ Clean complete"