diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 29 |
1 files changed, 29 insertions, 0 deletions
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} |