Some checks failed
CI/CD Pipeline / Build Docker Images (push) Blocked by required conditions
CI/CD Pipeline / Push to Gitea Registry (push) Blocked by required conditions
CI/CD Pipeline / Code Quality Checks (push) Failing after 3m55s
CI/CD Pipeline / Run Tests (push) Failing after 3h11m38s
- Add InspectionRecord model with is_federal_law_248, data_year, data_month fields - Add ProverkiClient with Playwright support for JS-rendered portal - Add streaming XML parser for large files (>50MB) - Add sync_inspections task with incremental loading logic - Starts from 01.01.2025 if DB is empty - Loads both FZ-294 and FZ-248 inspections - Stops after 2 consecutive empty months - Add InspectionService methods: get_last_loaded_period, has_data_for_period - Add Minpromtorg parsers (certificates, manufacturers) - Add Django Admin for parser models - Update README with parsers documentation and changelog
44 lines
1.3 KiB
Docker
44 lines
1.3 KiB
Docker
FROM python:3.11.2-slim
|
|
|
|
# Установка системных зависимостей
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends \
|
|
gcc \
|
|
postgresql-client \
|
|
libpq-dev \
|
|
libffi-dev \
|
|
libxml2-dev \
|
|
libxslt1-dev \
|
|
zlib1g-dev \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Создание рабочей директории
|
|
WORKDIR /app
|
|
|
|
# Копирование файлов зависимостей
|
|
COPY requirements.txt .
|
|
COPY requirements-dev.txt .
|
|
|
|
# Установка Python зависимостей
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
RUN pip install --no-cache-dir -r requirements-dev.txt
|
|
|
|
# Копирование исходного кода
|
|
COPY src/ ./src/
|
|
|
|
# Создание необходимых директорий
|
|
RUN mkdir -p logs staticfiles media
|
|
|
|
# PYTHONPATH для доступа к модулям
|
|
ENV PYTHONPATH=/app/src
|
|
|
|
# Создание пользователя для запуска приложения
|
|
RUN groupadd -r appgroup && useradd -r -g appgroup appuser
|
|
RUN chown -R appuser:appgroup /app
|
|
USER appuser
|
|
|
|
# Открытие порта
|
|
EXPOSE 8000
|
|
|
|
# Команда по умолчанию
|
|
CMD ["gunicorn", "config.wsgi:application", "--bind", "0.0.0.0:8000", "--workers", "3"] |