diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..21b357dc --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +SHELL := /bin/bash +.PHONY: help down +ARCH := $(shell uname -m) + +help: ## This help. + @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) + +.DEFAULT_GOAL := help + +up: ## Bring up containers + @echo 'Starting containers...' + @if [ "$(ARCH)" = "arm64" ]; then \ + docker-compose -f docker-compose.yml -f docker-compose.m1.yml up -d; \ + else \ + docker-compose up -d; \ + fi + +down: ## Stop and remove containers and volumes + @echo 'Removing containers and volumes...' + docker-compose down -v diff --git a/docker-compose.m1.yml b/docker-compose.m1.yml new file mode 100644 index 00000000..88f74e2e --- /dev/null +++ b/docker-compose.m1.yml @@ -0,0 +1,5 @@ +services: + db: + image: tobi312/rpi-postgresql-postgis:15-3.4-alpine-arm + django: + platform: linux/amd64