From 17565578c7f3a5443943ca68e481126825825439 Mon Sep 17 00:00:00 2001 From: Cody Hiar Date: Thu, 17 Feb 2022 13:57:09 -0700 Subject: Initial commit --- Makefile | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e1a8b92 --- /dev/null +++ b/Makefile @@ -0,0 +1,29 @@ +.PHONY: build + +# Shorcut for calling compose commands +DOCKER_COMPOSE = docker-compose -p parsely_localstack + +# https://blog.byronjsmith.com/makefile-shortcuts.html +# This allow us to launch tools without having to `souce .venv/bin/activate` first +VENV = .venv +export VIRTUAL_ENV := $(abspath ${VENV}) +export PATH := ${VIRTUAL_ENV}/bin:${PATH} + +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 virtual environment + bin/build.sh + +up: build ## Bring up the environment + ${DOCKER_COMPOSE} up -d + +start: ## Run the sample script + awslocal sqs create-queue --queue-name sample-queue + python sqs_sample.py + +down: ## shutdown external services + ${DOCKER_COMPOSE} down + +clean: down ## Remove the virtual environment and shut down services + rm -rf ${VENV} -- cgit v1.2.3