Hostityourself/infra/Makefile
Claude 00da63ec80
Auto-detect platform by default; use DOCKER_DEFAULT_PLATFORM for cross-compile targets
Remove hardcoded platform from compose file so plain 'make up' (or
'docker compose up --build') always builds natively for the host.
Explicit targets (up-arm64, up-armv7, etc.) set DOCKER_DEFAULT_PLATFORM.
2026-03-20 10:03:36 +00:00

36 lines
889 B
Makefile

# HIY — docker compose helpers
# Usage: make <target>
#
# Default (make up) — auto-detects the host platform.
#
# Explicit cross-compile targets:
# up-amd64 / up-x64 / up-win — linux/amd64 (Mac Intel, Windows, Linux x86)
# up-arm64 — linux/arm64 (Mac M1/M2/M3, Pi 4/5 64-bit OS)
# up-armv7 — linux/arm/v7 (Pi 2/3/4 32-bit OS)
# up-armv6 — linux/arm/v6 (Pi Zero, Pi 1)
COMPOSE = docker compose
UP = $(COMPOSE) up --build
.PHONY: up up-amd64 up-x64 up-win up-arm64 up-armv7 up-armv6 down logs
up:
$(UP)
up-amd64 up-x64 up-win:
DOCKER_DEFAULT_PLATFORM=linux/amd64 $(UP)
up-arm64:
DOCKER_DEFAULT_PLATFORM=linux/arm64 $(UP)
up-armv7:
DOCKER_DEFAULT_PLATFORM=linux/arm/v7 $(UP)
up-armv6:
DOCKER_DEFAULT_PLATFORM=linux/arm/v6 $(UP)
down:
$(COMPOSE) down
logs:
$(COMPOSE) logs -f server