docs(project): document architecture and verification workflow
Describe the delivered API, data retention, operations, and local verification commands; add a non-publishing CI workflow. Refs #10 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
53
Makefile
53
Makefile
@ -1,32 +1,55 @@
|
||||
.PHONY: up down build logs deps test-postgres
|
||||
COMPOSE ?= docker compose
|
||||
|
||||
test-postgres:
|
||||
./backend/scripts/test-postgres.sh
|
||||
# Les sous-make et le harness héritent des mêmes caches, sans effacer leur contenu.
|
||||
# Les valeurs d'environnement ou de ligne de commande restent prioritaires.
|
||||
TRADARR_GO_CACHE_ROOT := $(or $(strip $(TMPDIR)),$(strip $(IDEA_MANAGED_TMP)),/tmp/tradarr-$(shell id -u))
|
||||
export GOCACHE ?= $(TRADARR_GO_CACHE_ROOT)/go-build
|
||||
export GOMODCACHE ?= $(TRADARR_GO_CACHE_ROOT)/gomodcache
|
||||
|
||||
.PHONY: up down build logs deps dev-backend dev-frontend test-postgres lint test verify docker-build
|
||||
|
||||
# Démarrer tous les services
|
||||
up:
|
||||
docker-compose up --build
|
||||
$(COMPOSE) up --build
|
||||
|
||||
# Arrêter
|
||||
down:
|
||||
docker-compose down
|
||||
$(COMPOSE) down
|
||||
|
||||
# Build uniquement
|
||||
build:
|
||||
docker-compose build
|
||||
$(COMPOSE) build
|
||||
|
||||
# Logs
|
||||
logs:
|
||||
docker-compose logs -f
|
||||
$(COMPOSE) logs -f
|
||||
|
||||
# Télécharger les dépendances Go (à lancer avant le premier build)
|
||||
# Respecter les manifests et lockfiles existants, sans les réécrire.
|
||||
deps:
|
||||
cd backend && go mod tidy
|
||||
cd frontend && npm install
|
||||
cd backend && go mod download
|
||||
cd frontend && npm ci
|
||||
|
||||
# Lancer en développement (backend + frontend séparément)
|
||||
dev-backend:
|
||||
cd backend && go run ./cmd/server
|
||||
|
||||
dev-frontend:
|
||||
cd frontend && npm run dev
|
||||
|
||||
test-postgres:
|
||||
./backend/scripts/test-postgres.sh
|
||||
|
||||
lint:
|
||||
@unformatted="$$(gofmt -l backend)"; if [ -n "$$unformatted" ]; then printf 'Go formatting required:\n%s\n' "$$unformatted"; exit 1; fi
|
||||
cd backend && go vet ./...
|
||||
cd frontend && npm run lint
|
||||
|
||||
# Le harness exécute tous les tests Go, avec PostgreSQL obligatoire.
|
||||
test: test-postgres
|
||||
cd frontend && npm test
|
||||
|
||||
# Ordre séquentiel, y compris avec make -j : installation via make deps avant.
|
||||
verify:
|
||||
$(MAKE) lint
|
||||
$(MAKE) test
|
||||
cd frontend && npm run build
|
||||
|
||||
# Sans Compose, secrets, démarrage de services ni exécution du récupérateur.
|
||||
docker-build:
|
||||
docker build -t tradarr-backend:verify ./backend
|
||||
docker build -t tradarr-frontend:verify ./frontend
|
||||
|
||||
Reference in New Issue
Block a user