From fc739d591d23a2fab67705d4e6dbc3455527517d Mon Sep 17 00:00:00 2001 From: FazziCLAY Date: Sat, 21 Mar 2026 17:57:23 +0300 Subject: [PATCH] save --- Dockerfile | 18 ++++++++++++++++++ main.py | 4 ++-- requirements.txt | 2 ++ 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 Dockerfile create mode 100644 requirements.txt diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0b33f80 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM python:3.11-slim + +# Настройка рабочей директории +WORKDIR /app + +# Копирование файлов +COPY requirements.txt . +# Установка зависимостей (включая поддержку socks) +RUN pip install --no-cache-dir -r requirements.txt + +COPY . . + +# Среда по умолчанию (можно переопределить через docker run / docker-compose) +ENV PYTHONUNBUFFERED=1 +ENV POLL_INTERVAL=600 + +# Запуск службы +CMD ["python", "main.py"] \ No newline at end of file diff --git a/main.py b/main.py index a436797..1169b16 100644 --- a/main.py +++ b/main.py @@ -14,8 +14,8 @@ load_dotenv() # ================= КОНФИГУРАЦИЯ ================= URL_PARSER_ROOT = "https://fazziclay.com/api/v1/vstu_schedule_parser_v2/parser.json" BASE_URL_FILES = "https://fazziclay.com/api/v1/vstu_schedule_parser_v2/parsed/" -FILE_RESULT = "result.json" -FILE_CACHE = "raw_cache.json" +FILE_RESULT = "data/result.json" +FILE_CACHE = "data/raw_cache.json" GEMINI_MODEL="gemini-flash-latest" diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..5f4abef --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +requests[socks]==2.31.0 +python-dotenv==1.0.1 \ No newline at end of file