-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (23 loc) · 1.05 KB
/
Makefile
File metadata and controls
30 lines (23 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
COMPOSE_FILE := deploy/annotation/docker-compose.dev.yml
ENV_FILE := deploy/annotation/.env
ENV_EXAMPLE := deploy/annotation/.env.dev.example
.PHONY: setup teardown stop logs status test-stack
setup:
@if [ ! -f $(ENV_FILE) ]; then \
echo "Copying $(ENV_EXAMPLE) to $(ENV_FILE)"; \
cp $(ENV_EXAMPLE) $(ENV_FILE); \
fi
docker compose -f $(COMPOSE_FILE) --env-file $(ENV_FILE) up -d --pull always --wait
@echo "Argilla is up at http://localhost:6900"
teardown:
docker compose -f $(COMPOSE_FILE) --env-file $(ENV_FILE) down -v
stop:
docker compose -f $(COMPOSE_FILE) --env-file $(ENV_FILE) stop
logs:
docker compose -f $(COMPOSE_FILE) --env-file $(ENV_FILE) logs -f
status:
docker compose -f $(COMPOSE_FILE) --env-file $(ENV_FILE) ps
test-stack: setup
@python3 -c "import urllib.request; r = urllib.request.urlopen(urllib.request.Request('http://localhost:6900/api/v1/me', headers={'X-Argilla-Api-Key': 'argilla.apikey'}), timeout=10); assert r.status == 200" || (echo "Stack health check failed" && exit 1)
$(MAKE) teardown
@echo "Stack smoke test passed"