# Airport Cyber Resilience Simulator V2 — docker compose wrapper.
COMPOSE ?= docker compose
SERVICE ?= airport-cyber-sim-v2
URL     ?= http://localhost:8000

.PHONY: up down logs rebuild restart ps status shell clean

up:
	$(COMPOSE) up --build -d
	@echo "Simulator V2 running at $(URL)"
down:
	$(COMPOSE) down
logs:
	$(COMPOSE) logs -f $(SERVICE)
rebuild:
	$(COMPOSE) build --no-cache
	$(COMPOSE) up -d
restart:
	$(COMPOSE) restart $(SERVICE)
ps:
	$(COMPOSE) ps
status:
	@docker inspect --format '{{.State.Health.Status}}' $(SERVICE) 2>/dev/null || echo "container not running"
shell:
	$(COMPOSE) exec $(SERVICE) /bin/bash
clean:
	$(COMPOSE) down --rmi local --remove-orphans
