aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorCody Hiar <cody@hiar.ca>2022-02-17 13:57:09 -0700
committerCody Hiar <cody@hiar.ca>2022-02-17 13:57:09 -0700
commit17565578c7f3a5443943ca68e481126825825439 (patch)
tree9a3cee77c09dba0e8ca2484eda34d37dc1ae3687 /Makefile
Initial commitHEADmaster
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile29
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}