diff options
author | Cody Hiar <cody@hiar.ca> | 2021-03-21 13:14:53 -0600 |
---|---|---|
committer | Cody Hiar <cody@hiar.ca> | 2021-03-21 13:14:53 -0600 |
commit | 03870c0eca405cd8c08253c8b07b93a9a9fadc44 (patch) | |
tree | 985df08b591a5a32cc92830e1402f97dbc6d122f /Makefile |
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8a84b00 --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +.PHONY: build + +help: + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' + +build: ## Build the Docker image + cp requirements.txt docker/requirements.txt + docker-compose -p web_grater build + +up: build ## Bring the container up + docker-compose -p web_grater up -d + +down: ## Stop the container + docker-compose -p web_grater stop + +enter: ## Enter the running container + docker-compose -p web_grater exec backend /bin/bash + +clean: down ## Remove stoped containers + docker-compose -p web_grater rm + +crawl: ## Execute a crawl against a site + docker-compose -p web_grater exec backend /bin/bash -c 'cd web_grater && scrapy crawl grater' |