Skip to content

Commit 3824441

Browse files
committed
DBC22-1712: added makefile and conditional m1 image
1 parent 9ee9b9e commit 3824441

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
SHELL := /bin/bash
2+
.PHONY: help down
3+
ARCH := $(shell uname -m)
4+
5+
help: ## This help.
6+
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
7+
8+
.DEFAULT_GOAL := help
9+
10+
up: ## Bring up containers
11+
@echo 'Starting containers...'
12+
@if [ "$(ARCH)" = "arm64" ]; then \
13+
docker-compose -f docker-compose.yml -f docker-compose.m1.yml up -d; \
14+
else \
15+
docker-compose up -d; \
16+
fi
17+
18+
down: ## Stop and remove containers and volumes
19+
@echo 'Removing containers and volumes...'
20+
docker-compose down -v

docker-compose.m1.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
services:
2+
db:
3+
image: tobi312/rpi-postgresql-postgis:15-3.4-alpine-arm
4+
django:
5+
platform: linux/amd64

0 commit comments

Comments
 (0)