0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

イントロ

サイトの更新通知が欲しい時、必ずフィードがあるとは限らないですよね・・・
また、ショッピングサイトの価格変動を監視したい場合などもあります。

そんなあなたへ、Changedetection.io

Webサイトの変更検出を行ってくれて、変更があった場合にメールやWebhookで通知してくれる便利なツールです。
サイト全体の監視も可能ですし、一部の要素だけの監視を行う、あるいは特定の動き(ボタンを押すなど)をした後の監視など、いろいろなことができます。

なお、月$8.99からの有料プランもありますが、もちろんセルフホスト版は無料で利用可能です。

Changedetectionの使い方

環境情報
$ docker version
Client: Docker Engine - Community
 Version:           29.1.3
 API version:       1.52
 Go version:        go1.25.5
 Git commit:        f52814d
 Built:             Fri Dec 12 14:49:51 2025
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          29.1.3
  API version:      1.52 (minimum version 1.44)
  Go version:       go1.25.5
  Git commit:        fbf3ed2
  Built:            Fri Dec 12 14:49:51 2025
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v2.2.0
  GitCommit:        1c4457e00facac03ce1d75f7b6777a7a851e5c41
 runc:
  Version:          1.3.4
  GitCommit:        v1.3.4-0-gd6d73eb8
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

前提条件

  • Docker がインストールされていること
  • Traefik が導入されていること(リバースプロキシサーバー)

手順

  1. compose.ymlを作成します。

    domain.tldの部分は自分の環境に合わせて変更してください。認証がないので必要に応じてtinyauthを入れてください。

    公式はsockpuppetbrowserを使っていますが、リソース消費の観点からbrowserlessを使っています。

    compose.yml
    services:
      changedetection:
        image: ghcr.io/dgtlmoon/changedetection.io
        container_name: changedetection
        hostname: changedetection
        volumes:
          - ./data:/datastore
        environment:
          PORT: 5000
          LOGGER_LEVEL: SUCCESS
          PLAYWRIGHT_DRIVER_URL: ws://browserless:3000?token=thisisdemo
          TZ: Asia/Tokyo
          LC_ALL: en_US.UTF-8
        expose:
          - 5000
        restart: unless-stopped
        depends_on:
          browserless:
            condition: service_started
        networks:
          - traefik-network
          - default
        labels:
          traefik.enable: true
          traefik.http.services.changedetection.loadbalancer.server.port: 5000
          traefik.http.routers.changedetection.rule: Host(`changes.domain.tld`)
          traefik.http.routers.changedetection.entrypoints: websecure
          traefik.http.routers.changedetection.tls: true
          traefik.http.routers.changedetection.tls.certresolver: cloudflare
          traefik.docker.network: traefik-network
          glance.name: changedetection.io
          glance.icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/changedetection.png
          glance.url: https://changes.domain.tld/
          glance.description: Website change monitoring tool
          glance.id: changedetection
      browserless:
        image: ghcr.io/browserless/chromium
        container_name: browserless
        expose:
          - 3000
        environment:
          PORT: 3000
          TOKEN: thisisdemo
        networks:
          - default
        labels:
          glance.parent: changedetection
          glance.name: Browserless (Chrome)
    networks:
      traefik-network:
        external: true
      default:
        driver: bridge
    
  2. コンテナを起動します。

    docker compose -f compose.yml up -d
    

Changedetectionの感想

  • 良いところ
    • 変更検出が簡単にできる
    • Playwrightを利用した高度な監視が可能
    • Webhookやメールでの通知が可能
  • イマイチなところ
    • 公式のdocker-compose.ymlがわかりづらい(コメントが多いが見辛く、インデントもイマイチ)
    • Playwrightを利用する場合、リソース消費が大きい
      • 参考
      • sockpuppetbrowser: 常時300MB~400MB程度
      • browserless: 利用時: 300MB~500MB、非利用時: 50MB~100MB程度

以上、Changedetection.ioの紹介でした。
ブラウザのDevToolsを使ってのCSS PathやXPathを使える方は簡単に検出ができると思います。
漫画サイトの更新通知、ECサイトの価格変動監視など、いろいろな用途で使えると思うので、ぜひ試してみてください。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?