2
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2025-12-21 21:33:02 +01:00

update urlwatch

This commit is contained in:
kev
2021-10-25 12:08:10 +08:00
parent 0a586f067e
commit 53dc8dae1d
3 changed files with 50 additions and 41 deletions

View File

@@ -3,22 +3,26 @@
# #
FROM alpine:3 FROM alpine:3
LABEL maintainer="EasyPi Software Foundation" MAINTAINER EasyPi Software Foundation
ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1
RUN set -xe \ RUN set -xe \
&& apk add --no-cache ca-certificates \ && apk add --no-cache ca-certificates \
bash \
build-base \ build-base \
curl \
jq \
libffi-dev \ libffi-dev \
libxml2 \ libxml2 \
libxml2-dev \ libxml2-dev \
libxslt \ libxslt \
libxslt-dev \ libxslt-dev \
openssl-dev \ openssl-dev \
py3-cryptography \
py3-pip \
python3 \ python3 \
python3-dev \ python3-dev \
&& pip3 install --no-cache-dir appdirs \ && curl -sSL https://bootstrap.pypa.io/get-pip.py | python3 \
&& pip3 install appdirs \
cssselect \ cssselect \
keyring \ keyring \
lxml \ lxml \
@@ -26,8 +30,6 @@ RUN set -xe \
pyyaml \ pyyaml \
requests \ requests \
chump \ chump \
beautifulsoup4 \
pushbullet.py \
urlwatch \ urlwatch \
&& apk del build-base \ && apk del build-base \
libffi-dev \ libffi-dev \

View File

@@ -6,7 +6,9 @@ urlwatch
## docker-compose.yml ## docker-compose.yml
```yaml ```yaml
urlwatch: version: "3.8"
services:
urlwatch:
image: vimagick/urlwatch image: vimagick/urlwatch
volumes: volumes:
- ./data:/root/.urlwatch - ./data:/root/.urlwatch
@@ -18,16 +20,19 @@ urlwatch:
```yaml ```yaml
--- ---
url: "https://github.com/thp/urlwatch/releases/latest" name: urlwatch
url: "https://github.com/thp/urlwatch/tags"
filter: filter:
- xpath: '(//div[contains(@class,"release-timeline-tags")]//h4)[1]/a' - xpath: '(//h4[@data-test-selector="tag-title"]/a)[1]'
- html2text: re - html2text: re
- strip:
--- ---
name: shadowsocks-libev
url: "https://github.com/shadowsocks/shadowsocks-libev/releases/latest" url: "https://github.com/shadowsocks/shadowsocks-libev/releases/latest"
filter: filter:
- css: 'div.f1>a' - css: "div.flex-1>h1"
- html2text: re - html2text: re
... ...
@@ -44,7 +49,7 @@ Successfully sent message to Slack
1: https://github.com/thp/urlwatch/releases/latest 1: https://github.com/thp/urlwatch/releases/latest
2: https://github.com/shadowsocks/shadowsocks-libev/releases/latest 2: https://github.com/shadowsocks/shadowsocks-libev/releases/latest
>>> urlwatch --test-filter 2 >>> urlwatch --test-filter 2
v3.2.5 v3.3.5
>>> exit >>> exit
``` ```
@@ -64,7 +69,9 @@ See the [crontab manpage for details on format](https://man7.org/linux/man-pages
### Mount the crontab file as a docker volume ### Mount the crontab file as a docker volume
```yaml ```yaml
urlwatch: version: "3.8"
services:
urlwatch:
image: vimagick/urlwatch image: vimagick/urlwatch
volumes: volumes:
- ./data:/root/.urlwatch - ./data:/root/.urlwatch

View File

@@ -1,7 +1,7 @@
version: "3.8"
services: services:
urlwatch: urlwatch:
image: vimagick/urlwatch image: vimagick/urlwatch
volumes: volumes:
- ./data:/root/.urlwatch - ./data:/root/.urlwatch
- ./data/crontab:/etc/crontabs/root
restart: unless-stopped restart: unless-stopped