Skip to content

Commit

Permalink
DBC22-1712: added makefile and conditional m1 image
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrel-oxd authored and fatbird committed Feb 12, 2024
1 parent 51e0e15 commit 62bc4c2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions docker-compose.m1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
services:
db:
image: tobi312/rpi-postgresql-postgis:15-3.4-alpine-arm
django:
platform: linux/amd64

0 comments on commit 62bc4c2

Please sign in to comment.