forked from theyosh/TerrariumPI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (37 loc) · 982 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
IMAGE ?= theyosh/terrariumpi
VERSION ?= $(shell grep -E "__version__ = '(.*)'" terrariumPI.py | grep -Po [0-9\.]+)
GITHUB_SHA ?= $(shell git rev-parse HEAD)
.PHONY: all build run logs gui docs
all: build push
build:
docker run --privileged docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64
docker buildx build \
--progress=plain \
--platform linux/arm/v7 \
-t $(IMAGE):$(VERSION) \
--build-arg GITHUB_SHA=${GITHUB_SHA} \
-f Dockerfile \
.
push:
docker run --privileged docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64
GITHUB_SHA=${GITHUB_SHA} docker buildx build \
--progress=plain \
--platform linux/arm/v7 \
-t $(IMAGE):$(VERSION) \
--build-arg GITHUB_SHA=${GITHUB_SHA} \
-f Dockerfile \
--push \
.
run: build restart
restart:
docker-compose down; docker-compose up -d
sleep 30 # Wait for it to come up
$(MAKE) logs
logs:
docker-compose logs -f
gui:
npm install
npm run build
docs:
bundle install
cd docs && jekyll serve