2023-09-13 18:08:22 +02:00
|
|
|
FROM debian:12-slim AS rssbridge
|
2021-05-13 19:57:10 +02:00
|
|
|
|
|
|
|
LABEL description="RSS-Bridge is a PHP project capable of generating RSS and Atom feeds for websites that don't have one."
|
|
|
|
LABEL repository="https://github.com/RSS-Bridge/rss-bridge"
|
|
|
|
LABEL website="https://github.com/RSS-Bridge/rss-bridge"
|
|
|
|
|
2023-09-13 18:08:22 +02:00
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
2024-02-20 07:03:04 +00:00
|
|
|
RUN set -xe && \
|
|
|
|
apt-get update && \
|
2022-05-12 02:19:25 +02:00
|
|
|
apt-get install --yes --no-install-recommends \
|
2023-09-13 18:08:22 +02:00
|
|
|
ca-certificates \
|
2022-05-12 02:19:25 +02:00
|
|
|
nginx \
|
[OLXBridge] new bridge (#2944)
* [OLXBridge] new bridge
* [OLXBridge] option to limit to shipping offers only
* [OLXBridge] set the feed title according to search query
* [OLXBridge] Fix PHP notices
* [OLXBridge] Remove trailing slash from the URL
* [OLXBridge] filter out the imposed additional search categories
* [OLXBridge] limit search to 'new' OLX platform variants
* [OLXBridge] Parse date, add ID, description
Deep-crawl all results. Penalty is low, as we were doing this for almost all of the results, anyway, yet it allows to obtain a unique ID, an uncomplicated Date string and a description.
Requires ext-intl for parsing the date according to locale.
* [OLXBridge] Parse date, add ID, description
Deep-crawl all results. Penalty is low, as we were doing this for almost all of the results, anyway, yet it allows to obtain a unique ID, an uncomplicated Date string and a description.
Requires ext-intl for parsing the date according to locale.
* [OLXBridge] Images are optional, handle appropriately
* [OLXBridge] handle the ID coming from sibling auto-moto portal
* [OLXBridge] handle the photos coming from sibling auto-moto portal
* [OLXBridge] use meta property to find img URL
* [OLXBridge] handle the date coming from sibling auto-moto portal
* [OLXBridge] use simplified syntax to retrieve content attribute value
* [OLXBridge] handle the description coming from sibling auto-moto portal
* [OLXBridge] fix phpcs complaints
* [OLXBridge] add categories
* [OLXBridge] handle the categories coming from sibling auto-moto portal
* [OLXBridge] hint image MIME type
OLX images have no obvious extension
* [OLXBridge] Fix content formatting
* [OLXBridge] URL is pattern-checked, so no need to check again
* [OLXBridge] return actual search query as URI
2022-11-17 17:57:05 +01:00
|
|
|
nss-plugin-pem \
|
2023-09-13 18:08:22 +02:00
|
|
|
php-curl \
|
|
|
|
php-fpm \
|
|
|
|
php-intl \
|
|
|
|
# php-json is enabled by default with PHP 8.2 in Debian 12
|
|
|
|
php-mbstring \
|
|
|
|
php-memcached \
|
|
|
|
# php-opcache is enabled by default with PHP 8.2 in Debian 12
|
|
|
|
# php-openssl is enabled by default with PHP 8.2 in Debian 12
|
|
|
|
php-sqlite3 \
|
|
|
|
php-xml \
|
|
|
|
php-zip \
|
|
|
|
# php-zlib is enabled by default with PHP 8.2 in Debian 12
|
2024-02-20 07:03:04 +00:00
|
|
|
# for downloading libcurl-impersonate
|
|
|
|
curl \
|
2025-05-17 20:18:36 +02:00
|
|
|
# for patching libcurl-impersonate
|
|
|
|
patchelf \
|
2023-09-13 18:08:22 +02:00
|
|
|
&& \
|
2024-02-20 07:03:04 +00:00
|
|
|
# install curl-impersonate library
|
2025-05-17 20:18:36 +02:00
|
|
|
curlimpersonate_version=1.0.0rc2 && \
|
2024-02-20 07:03:04 +00:00
|
|
|
{ \
|
|
|
|
{ \
|
|
|
|
[ $(arch) = 'aarch64' ] && \
|
|
|
|
archive="libcurl-impersonate-v${curlimpersonate_version}.aarch64-linux-gnu.tar.gz" && \
|
2025-05-17 20:18:36 +02:00
|
|
|
sha512sum="c8add80e7a0430a074edea1a11f73d03044c48e848e164af2d6f362866623e29bede207a50f18f95b1bc5ab3d33f5c31408be60a6da66b74a0d176eebe299116" \
|
2024-02-20 07:03:04 +00:00
|
|
|
; } \
|
|
|
|
|| { \
|
|
|
|
[ $(arch) = 'armv7l' ] && \
|
|
|
|
archive="libcurl-impersonate-v${curlimpersonate_version}.arm-linux-gnueabihf.tar.gz" && \
|
2025-05-17 20:18:36 +02:00
|
|
|
sha512sum="d0403ca4ad55a8d499b120e5675c7b5a0dc4946af49c933e91fc24455ffe5e122aa21ee95554612ff5d1bd6faea1556e1e1b9c821918e2644cc9bcbddc05747a" \
|
2024-02-20 07:03:04 +00:00
|
|
|
; } \
|
|
|
|
|| { \
|
|
|
|
[ $(arch) = 'x86_64' ] && \
|
|
|
|
archive="libcurl-impersonate-v${curlimpersonate_version}.x86_64-linux-gnu.tar.gz" && \
|
2025-05-17 20:18:36 +02:00
|
|
|
sha512sum="35cafda2b96df3218a6d8545e0947a899837ede51c90f7ef2980bd2d99dbd67199bc620000df28b186727300b8c7046d506807fb48ee0fbc068dc8ae01986339" \
|
2024-02-20 07:03:04 +00:00
|
|
|
; } \
|
|
|
|
} && \
|
2025-05-17 20:18:36 +02:00
|
|
|
curl -LO "https://github.com/lexiforest/curl-impersonate/releases/download/v${curlimpersonate_version}/${archive}" && \
|
2024-02-20 07:03:04 +00:00
|
|
|
echo "$sha512sum $archive" | sha512sum -c - && \
|
|
|
|
mkdir -p /usr/local/lib/curl-impersonate && \
|
2025-05-17 20:18:36 +02:00
|
|
|
tar xaf "$archive" -C /usr/local/lib/curl-impersonate && \
|
|
|
|
patchelf --set-soname libcurl.so.4 /usr/local/lib/curl-impersonate/libcurl-impersonate.so && \
|
2024-02-20 07:03:04 +00:00
|
|
|
rm "$archive" && \
|
2025-05-17 20:18:36 +02:00
|
|
|
apt-get purge --assume-yes curl patchelf && \
|
2023-09-13 18:08:22 +02:00
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2025-05-17 20:18:36 +02:00
|
|
|
ENV LD_PRELOAD /usr/local/lib/curl-impersonate/libcurl-impersonate.so
|
|
|
|
ENV CURL_IMPERSONATE chrome131
|
2024-02-20 07:03:04 +00:00
|
|
|
|
2023-09-13 18:08:22 +02:00
|
|
|
# logs should go to stdout / stderr
|
|
|
|
RUN ln -sfT /dev/stderr /var/log/nginx/error.log; \
|
|
|
|
ln -sfT /dev/stdout /var/log/nginx/access.log; \
|
|
|
|
chown -R --no-dereference www-data:adm /var/log/nginx/
|
2021-09-05 05:10:54 +02:00
|
|
|
|
2023-09-13 18:08:22 +02:00
|
|
|
COPY ./config/nginx.conf /etc/nginx/sites-available/default
|
|
|
|
COPY ./config/php-fpm.conf /etc/php/8.2/fpm/pool.d/rss-bridge.conf
|
2024-01-05 07:22:16 +01:00
|
|
|
COPY ./config/php.ini /etc/php/8.2/fpm/conf.d/90-rss-bridge.ini
|
2023-09-13 18:08:22 +02:00
|
|
|
|
|
|
|
COPY --chown=www-data:www-data ./ /app/
|
|
|
|
|
2022-05-30 20:05:42 +02:00
|
|
|
EXPOSE 80
|
|
|
|
|
2022-05-12 02:19:25 +02:00
|
|
|
ENTRYPOINT ["/app/docker-entrypoint.sh"]
|