# mcaxl docs — compose wrapper. # # Mode (dev/prod) is driven by COMPOSE_PROFILES in .env. Flip it there. # `docker compose` honors COMPOSE_PROJECT and COMPOSE_PROFILES automatically. COMPOSE ?= docker compose .PHONY: help up down restart logs shell ps build clean prod dev net pull-prod pull-dev help: ## Show this help @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " \033[36m%-10s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) up: ## Start the active profile (set COMPOSE_PROFILES in .env) $(COMPOSE) up -d --build dev: ## Start dev explicitly (hot reload at https://$${DEV_DOMAIN}) COMPOSE_PROFILES=dev $(COMPOSE) up -d --build prod: ## Start prod explicitly (static site at https://$${DOMAIN}) COMPOSE_PROFILES=prod $(COMPOSE) up -d --build down: ## Stop and remove all containers for this project COMPOSE_PROFILES=dev $(COMPOSE) down COMPOSE_PROFILES=prod $(COMPOSE) down restart: ## Restart the active profile $(COMPOSE) restart logs: ## Tail logs for active services $(COMPOSE) logs -f --tail=200 shell: ## Shell into the dev container $(COMPOSE) exec docs-dev sh ps: ## Show running containers for this project $(COMPOSE) ps build: ## Build images for both profiles COMPOSE_PROFILES=dev,prod $(COMPOSE) build clean: ## Remove containers, images, and volumes for this project COMPOSE_PROFILES=dev,prod $(COMPOSE) down --rmi local -v net: ## Create the external `caddy` network (one-time, host-wide) docker network inspect caddy >/dev/null 2>&1 || docker network create caddy pull-prod: ## Deploy: git pull, rebuild, and restart the prod container git pull --ff-only COMPOSE_PROFILES=prod $(COMPOSE) up -d --build docs-prod @echo @COMPOSE_PROFILES=prod $(COMPOSE) ps docs-prod pull-dev: ## Deploy: git pull, rebuild, and restart the dev container git pull --ff-only COMPOSE_PROFILES=dev $(COMPOSE) up -d --build docs-dev @echo @COMPOSE_PROFILES=dev $(COMPOSE) ps docs-dev