.PHONY: dev-infra dev-infra-down backend frontend migrate-up migrate-down lint test

# Postgres, Zitadel and SeaweedFS are not run by this repo. They're shared
# infrastructure in a separate Infrastructure repo; ../../Infrastructure
# below assumes it's checked out as a sibling of Admin. Adjust the path if
# yours isn't. See that repo's own README.
dev-infra:
	docker compose -f ../../Infrastructure/compose.yml -f ../../Infrastructure/compose.dev.yml up -d

dev-infra-down:
	docker compose -f ../../Infrastructure/compose.yml -f ../../Infrastructure/compose.dev.yml down

backend:
	cd backend && go run ./cmd/server

frontend:
	cd frontend && npm run dev

migrate-up:
	migrate -database "$$DATABASE_URL" -path backend/migrations up

migrate-down:
	migrate -database "$$DATABASE_URL" -path backend/migrations down 1

lint:
	cd backend && golangci-lint run ./...

test:
	cd backend && go test ./...
