mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2026-01-20 06:00:20 +00:00
Multi-language / Translations Support (#3696) - Complete internationalization system implemented - Support for 7 languages: Czech (cs), German (de), French (fr), Italian (it), Korean (ko), Chinese Simplified (zh), Chinese Traditional (zh_TW) - Language selector with localized flags and theming - Flash message translations - Multiple translation fixes and improvements across all languages - Language setting preserved across redirects Pluggable Content Fetchers (#3653) - New architecture for extensible content fetcher system - Allows custom fetcher implementations Image / Screenshot Comparison Processor (#3680) - New processor for visual change detection (disabled for this release) - Supporting CSS/JS infrastructure added UI Improvements Design & Layout - Auto-generated tag color schemes - Simplified login form styling - Removed hard-coded CSS, moved to SCSS variables - Tag UI cleanup and improvements - Automatic tab wrapper functionality - Menu refactoring for better organization - Cleanup of offset settings - Hide sticky tabs on narrow viewports - Improved responsive layout (#3702) User Experience - Modal alerts/confirmations on delete/clear operations (#3693, #3598, #3382) - Auto-add https:// to URLs in quickwatch form if not present - Better redirect handling on login (#3699) - 'Recheck all' now returns to correct group/tag (#3673) - Language set redirect keeps hash fragment - More friendly human-readable text throughout UI Performance & Reliability Scheduler & Processing - Soft delays instead of blocking time.sleep() calls (#3710) - More resilient handling of same UUID being processed (#3700) - Better Puppeteer timeout handling - Improved Puppeteer shutdown/cleanup (#3692) - Requests cleanup now properly async History & Rendering - Faster server-side "difference" rendering on History page (#3442) - Show ignored/triggered rows in history - API: Retry watch data if watch dict changed (more reliable) API Improvements - Watch get endpoint: retry mechanism for changed watch data - WatchHistoryDiff API endpoint includes extra format args (#3703) Testing Improvements - Replace time.sleep with wait_for_notification_endpoint_output (#3716) - Test for mode switching (#3701) - Test for #3720 added (#3725) - Extract-text difference test fixes - Improved dev workflow Bug Fixes - Notification error text output (#3672, #3669, #3280) - HTML validation fixes (#3704) - Template discovery path fixes - Notification debug log now uses system locale for dates/times - Puppeteer spelling mistake in log output - Recalculation on anchor change - Queue bubble update disabled temporarily Dependency Updates - beautifulsoup4 updated (#3724) - psutil 7.1.0 → 7.2.1 (#3723) - python-engineio ~=4.12.3 → ~=4.13.0 (#3707) - python-socketio ~=5.14.3 → ~=5.16.0 (#3706) - flask-socketio ~=5.5.1 → ~=5.6.0 (#3691) - brotli ~=1.1 → ~=1.2 (#3687) - lxml updated (#3590) - pytest ~=7.2 → ~=9.0 (#3676) - jsonschema ~=4.0 → ~=4.25 (#3618) - pluggy ~=1.5 → ~=1.6 (#3616) - cryptography 44.0.1 → 46.0.3 (security) (#3589) Documentation - README updated with viewport size setup information Development Infrastructure - Dev container only built on dev branch - Improved dev workflow tooling
138 lines
4.3 KiB
Docker
138 lines
4.3 KiB
Docker
# pip dependencies install stage
|
|
|
|
ARG PYTHON_VERSION=3.11
|
|
|
|
FROM python:${PYTHON_VERSION}-slim-bookworm AS builder
|
|
|
|
# See `cryptography` pin comment in requirements.txt
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
g++ \
|
|
gcc \
|
|
libc-dev \
|
|
libffi-dev \
|
|
libjpeg-dev \
|
|
libssl-dev \
|
|
libxslt-dev \
|
|
make \
|
|
patch \
|
|
pkg-config \
|
|
zlib1g-dev
|
|
|
|
RUN mkdir /install
|
|
WORKDIR /install
|
|
|
|
COPY requirements.txt /requirements.txt
|
|
|
|
# Use cache mounts and multiple wheel sources for faster ARM builds
|
|
ENV PIP_CACHE_DIR=/tmp/pip-cache
|
|
# Help Rust find OpenSSL for cryptography package compilation on ARM
|
|
ENV PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/lib/arm-linux-gnueabihf/pkgconfig:/usr/lib/aarch64-linux-gnu/pkgconfig"
|
|
ENV PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
|
|
ENV OPENSSL_DIR="/usr"
|
|
ENV OPENSSL_LIB_DIR="/usr/lib/arm-linux-gnueabihf"
|
|
ENV OPENSSL_INCLUDE_DIR="/usr/include/openssl"
|
|
# Additional environment variables for cryptography Rust build
|
|
ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1
|
|
|
|
RUN --mount=type=cache,id=pip,sharing=locked,target=/tmp/pip-cache \
|
|
pip install \
|
|
--prefer-binary \
|
|
--extra-index-url https://www.piwheels.org/simple \
|
|
--extra-index-url https://pypi.anaconda.org/ARM-software/simple \
|
|
--cache-dir=/tmp/pip-cache \
|
|
--target=/dependencies \
|
|
-r /requirements.txt
|
|
|
|
# Playwright is an alternative to Selenium
|
|
# Excluded this package from requirements.txt to prevent arm/v6 and arm/v7 builds from failing
|
|
# https://github.com/dgtlmoon/changedetection.io/pull/1067 also musl/alpine (not supported)
|
|
RUN --mount=type=cache,id=pip,sharing=locked,target=/tmp/pip-cache \
|
|
pip install \
|
|
--prefer-binary \
|
|
--cache-dir=/tmp/pip-cache \
|
|
--target=/dependencies \
|
|
playwright~=1.56.0 \
|
|
|| echo "WARN: Failed to install Playwright. The application can still run, but the Playwright option will be disabled."
|
|
|
|
# OpenCV is optional for fast image comparison (pixelmatch is the fallback)
|
|
# Skip on arm/v7 and arm/v8 where builds take weeks - excluded from requirements.txt
|
|
ARG TARGETPLATFORM
|
|
RUN --mount=type=cache,id=pip,sharing=locked,target=/tmp/pip-cache \
|
|
case "$TARGETPLATFORM" in \
|
|
linux/arm/v7|linux/arm/v8) \
|
|
echo "INFO: Skipping OpenCV on $TARGETPLATFORM (build takes too long), using pixelmatch fallback" \
|
|
;; \
|
|
*) \
|
|
pip install \
|
|
--prefer-binary \
|
|
--extra-index-url https://www.piwheels.org/simple \
|
|
--cache-dir=/tmp/pip-cache \
|
|
--target=/dependencies \
|
|
opencv-python-headless>=4.8.0.76 \
|
|
|| echo "WARN: OpenCV install failed, will use pixelmatch fallback" \
|
|
;; \
|
|
esac
|
|
|
|
|
|
# Final image stage
|
|
FROM python:${PYTHON_VERSION}-slim-bookworm
|
|
LABEL org.opencontainers.image.source="https://github.com/dgtlmoon/changedetection.io"
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
libxslt1.1 \
|
|
# For presenting price amounts correctly in the restock/price detection overview
|
|
locales \
|
|
# For pdftohtml
|
|
poppler-utils \
|
|
# favicon type detection and other uses
|
|
file \
|
|
zlib1g \
|
|
# OpenCV dependencies for image processing
|
|
libglib2.0-0 \
|
|
libsm6 \
|
|
libxext6 \
|
|
libxrender-dev \
|
|
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
# https://stackoverflow.com/questions/58701233/docker-logs-erroneously-appears-empty-until-container-stops
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
RUN [ ! -d "/datastore" ] && mkdir /datastore
|
|
|
|
# Re #80, sets SECLEVEL=1 in openssl.conf to allow monitoring sites with weak/old cipher suites
|
|
RUN sed -i 's/^CipherString = .*/CipherString = DEFAULT@SECLEVEL=1/' /etc/ssl/openssl.cnf
|
|
|
|
# Copy modules over to the final image and add their dir to PYTHONPATH
|
|
COPY --from=builder /dependencies /usr/local
|
|
ENV PYTHONPATH=/usr/local
|
|
|
|
EXPOSE 5000
|
|
|
|
# The actual flask app module
|
|
COPY changedetectionio /app/changedetectionio
|
|
|
|
# Compile translation files for i18n support
|
|
RUN pybabel compile -d /app/changedetectionio/translations
|
|
|
|
# Also for OpenAPI validation wrapper - needs the YML
|
|
RUN [ ! -d "/app/docs" ] && mkdir /app/docs
|
|
COPY docs/api-spec.yaml /app/docs/api-spec.yaml
|
|
|
|
# Starting wrapper
|
|
COPY changedetection.py /app/changedetection.py
|
|
|
|
# Github Action test purpose(test-only.yml).
|
|
# On production, it is effectively LOGGER_LEVEL=''.
|
|
ARG LOGGER_LEVEL=''
|
|
ENV LOGGER_LEVEL="$LOGGER_LEVEL"
|
|
|
|
# Default
|
|
ENV LC_ALL=en_US.UTF-8
|
|
|
|
WORKDIR /app
|
|
CMD ["python", "./changedetection.py", "-d", "/datastore"]
|
|
|
|
|