forked from mtusi2026/mtusi2026lab3
36 lines
498 B
Makefile
36 lines
498 B
Makefile
PYTHON ?= python3
|
|
COMPOSE ?= docker compose
|
|
|
|
.PHONY: up down migrate restart test logs stop-one restart-one clean check
|
|
|
|
up:
|
|
$(COMPOSE) up -d --build
|
|
|
|
down:
|
|
$(COMPOSE) down
|
|
|
|
migrate:
|
|
$(COMPOSE) exec api1 ./migrate up
|
|
|
|
restart:
|
|
$(COMPOSE) restart
|
|
|
|
test:
|
|
$(PYTHON) tests/client.py
|
|
$(PYTHON) tests/load.py
|
|
|
|
check:
|
|
$(PYTHON) scripts/check_contract.py
|
|
|
|
logs:
|
|
$(COMPOSE) logs -f
|
|
|
|
stop-one:
|
|
./scripts/stop-one.sh api1
|
|
|
|
restart-one:
|
|
./scripts/restart-one.sh api1
|
|
|
|
clean: down
|
|
$(COMPOSE) down -v
|