-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (38 loc) · 1.62 KB
/
Makefile
File metadata and controls
49 lines (38 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
.PHONY: help
.PHONY: help
help:
@echo "Available targets:"
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " \033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | sort
-include infra/helpers.mk
-include infra/neo4j/helpers.mk
pre-commit-install: ## Install pre-commit hooks
@pre-commit install
@pre-commit gc
pre-commit-uninstall: ## Uninstall pre-commit hooks
@pre-commit uninstall
pre-commit-validate: ## Validate files with pre-commit hooks
@pre-commit run --all-files
run-all: ## Start the Docker containers
docker-compose up --build
docker-compose-down: ## Stop the Docker containers
docker-compose down
lock-dependencies: ## Generate Pipfile.lock using Docker (no local Python/pipenv needed)
$(eval PYTHON_IMAGE := $(shell grep "^FROM python" Dockerfile | awk '{print $$2}'))
@echo "Generating Pipfile.lock using image: $(PYTHON_IMAGE)"
@docker run --rm \
-v $(PWD)/$(BOOK_STORE_DIR):/app \
-w /app \
$(PYTHON_IMAGE) \
bash -c "pip install --quiet --root-user-action ignore pipenv && pipenv lock"
@echo "✓ Pipfile.lock generated successfully in $(BOOK_STORE_DIR)/"
#? build-black-duck-scan: Build the Black Duck scan Docker image
build-black-duck-scan:
docker build -f Dockerfile.deps -t detect-deps --progress plain .
#? run-black-duck-scan: Run Black Duck scan
run-black-duck-scan:
@docker run --rm -it -e BRIDGE_BLACKDUCKSCA_TOKEN=$(BRIDGE_BLACKDUCKSCA_TOKEN) \
-v $(PWD)/input:/scan/input \
detect-deps
compose-restart: ## Rebuild and restart multiple services --build
@docker compose -f docker-compose.yaml up -d api --build
@docker compose -f docker-compose.yaml up -d worker-1 --build