Files
schedule/deploy.sh
Vladislav Kopnin 9c9875579c Тесты и инфраструктура
- tests/: 104 теста — lessons (все форматы ячеек), xlsx (мержи/скрытые
  столбцы/красный текст/даты), parsing (группы/недели/индексы), API (TestClient,
  TTL/modified/stale-while-error, 404/400/502)
- xlsx_builder.py: генерация xlsx в памяти для тестов без openpyxl
- docker-compose: healthz-хелскчеки (не блокируют старт), SCHEDULE_LINK
- Makefile: target test
- requirements: закреплённые версии
- .gitignore: __pycache__/, .venv/ и т.д.
2026-09-09 11:33:58 +03:00

30 lines
733 B
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")"
if ! command -v docker >/dev/null || ! docker compose version >/dev/null 2>&1;
then
echo "Ошибка: нужен Docker с compose-плагином (v2)." >&2
exit 1
fi
if [ ! -f .env ]; then
echo "Ошибка: файл .env не найден. Скопируйте .env.example в .env и укажите SCHEDULE_LINK." >&2
exit 1
fi
if ! grep -qE '^SCHEDULE_LINK=.+' .env; then
echo "Ошибка: в .env не заполнена переменная SCHEDULE_LINK." >&2
exit 1
fi
echo "Сборка образов..."
docker compose build
echo "Запуск микросервисов..."
docker compose up -d --remove-orphans
echo
docker compose ps