Add start.sh and Makefile build-only targets
start.sh builds via 'make build' (platform auto-detected) then starts services detached with 'docker compose up -d'. Makefile gains build/build-<platform> targets that build images without starting, mirroring the existing up/<platform> targets.
This commit is contained in:
parent
00da63ec80
commit
b060ec68af
2 changed files with 27 additions and 1 deletions
|
|
@ -10,10 +10,29 @@
|
|||
# up-armv6 — linux/arm/v6 (Pi Zero, Pi 1)
|
||||
|
||||
COMPOSE = docker compose
|
||||
BUILD = $(COMPOSE) build
|
||||
UP = $(COMPOSE) up --build
|
||||
|
||||
.PHONY: up up-amd64 up-x64 up-win up-arm64 up-armv7 up-armv6 down logs
|
||||
.PHONY: build build-amd64 build-x64 build-win build-arm64 build-armv7 build-armv6 \
|
||||
up up-amd64 up-x64 up-win up-arm64 up-armv7 up-armv6 down logs
|
||||
|
||||
# ── Build only (no start) ─────────────────────────────────────────────────────
|
||||
build:
|
||||
$(BUILD)
|
||||
|
||||
build-amd64 build-x64 build-win:
|
||||
DOCKER_DEFAULT_PLATFORM=linux/amd64 $(BUILD)
|
||||
|
||||
build-arm64:
|
||||
DOCKER_DEFAULT_PLATFORM=linux/arm64 $(BUILD)
|
||||
|
||||
build-armv7:
|
||||
DOCKER_DEFAULT_PLATFORM=linux/arm/v7 $(BUILD)
|
||||
|
||||
build-armv6:
|
||||
DOCKER_DEFAULT_PLATFORM=linux/arm/v6 $(BUILD)
|
||||
|
||||
# ── Build + start (foreground) ────────────────────────────────────────────────
|
||||
up:
|
||||
$(UP)
|
||||
|
||||
|
|
|
|||
7
infra/start.sh
Executable file
7
infra/start.sh
Executable file
|
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
make build
|
||||
docker compose up -d
|
||||
Loading…
Add table
Reference in a new issue