This commit is contained in:
2025-05-18 05:21:16 -05:00
parent 132073ca19
commit c19bedc54a
65 changed files with 705 additions and 575 deletions

View File

@ -44,6 +44,9 @@ rebuild:
$(DOCKER_COMPOSE) up --build -d
@$(MAKE) wait
preload:
@docker exec -it $$(docker ps -qf "name=$(PROJECT_NAME)-web") flask preload-data
logs:
$(DOCKER_COMPOSE) logs -f
@ -77,7 +80,14 @@ test:
wait:
@echo "[⏳] Waiting for web container to be healthy..."
@until [ "$$(docker inspect -f '{{.State.Health.Status}}' $(PROJECT_NAME)-web-1 2>/dev/null)" = "healthy" ]; do \
printf "."; sleep 2; \
done
@echo "\n[✅] Web container is healthy!"
@timeout 90 bash -c '\
WEB_CONTAINER=$$($(DOCKER_COMPOSE) ps -q web); \
if [ -z "$$WEB_CONTAINER" ]; then \
echo "[❌] Could not detect web container!"; \
exit 1; \
fi; \
echo "[] Detected container: $$WEB_CONTAINER"; \
while [ "$$(docker inspect -f "{{.State.Health.Status}}" $$WEB_CONTAINER 2>/dev/null)" != "healthy" ]; do \
sleep 2; echo -n "."; \
done; echo "\n[✅] $$WEB_CONTAINER is healthy!"'