.PHONY: up down build setup shell logs restart clean

## Build images and start the stack in the background.
up:
	docker compose up -d --build

## Stop and remove the containers (keeps the db-data volume).
down:
	docker compose down

## Rebuild images without starting containers.
build:
	docker compose build

## Full setup: start the stack, run composer install, oe:setup:shop, demodata,
## admin user creation, and attempt module install/activate. See bin/setup.sh.
setup:
	./bin/setup.sh

## Shell into the PHP container, cwd shop/.
shell:
	docker compose exec web bash

## Follow container logs.
logs:
	docker compose logs -f

restart: down up

## Stop containers and delete the db-data volume — next `make setup` starts clean.
clean:
	docker compose down -v
