Enable Chrome/Playwright for changedetection
This commit is contained in:
parent
5794ef6625
commit
6786060a1f
5 changed files with 53 additions and 17 deletions
|
|
@ -1,19 +1,20 @@
|
|||
---
|
||||
- name: Create a volume
|
||||
- name: Create the compose project directory
|
||||
ansible.builtin.file:
|
||||
path: "/home/{{ ansible_user_id }}/changedetection"
|
||||
state: directory
|
||||
owner: "{{ ansible_user_id }}"
|
||||
mode: '0744'
|
||||
- name: Create the compose project
|
||||
ansible.builtin.template:
|
||||
src: docker-compose.yaml.j2
|
||||
dest: "/home/{{ ansible_user_id }}/changedetection/docker-compose.yaml"
|
||||
owner: "{{ ansible_user_id }}"
|
||||
mode: '0644'
|
||||
- name: Create and start services
|
||||
become: true
|
||||
community.docker.docker_volume:
|
||||
name: changedetection_data
|
||||
- name: Install the container
|
||||
become: true
|
||||
community.docker.docker_container:
|
||||
name: changedetection-server
|
||||
image: "docker.io/dgtlmoon/changedetection.io:{{ changedetection_version }}"
|
||||
ports:
|
||||
- "127.0.0.1:5000:5000/tcp"
|
||||
mounts:
|
||||
- source: changedetection_data
|
||||
target: /datastore
|
||||
restart_policy: always
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: "/home/{{ ansible_user_id }}/changedetection/"
|
||||
- name: Include simple-reverse-proxy role
|
||||
ansible.builtin.include_role:
|
||||
name: simple-reverse-proxy
|
||||
|
|
|
|||
30
roles/changedetection/templates/docker-compose.yaml.j2
Normal file
30
roles/changedetection/templates/docker-compose.yaml.j2
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
services:
|
||||
changedetection-server:
|
||||
image: "docker.io/dgtlmoon/changedetection.io:{{ changedetection_version }}"
|
||||
hostname: changedetection
|
||||
restart: always
|
||||
ports:
|
||||
- "127.0.0.1:5000:5000/tcp"
|
||||
volumes:
|
||||
- "changedetection_data:/datastore"
|
||||
environment:
|
||||
- PLAYWRIGHT_DRIVER_URL=ws://browserless-chrome:3000
|
||||
# See configuration from: https://www.youtube.com/watch?v=o_iG4Wunh98
|
||||
browserless-chrome:
|
||||
image: "browserless/chrome:{{ browserless_chrome_version }}"
|
||||
hostname: browserless-chrome
|
||||
restart: always
|
||||
environment:
|
||||
- SCREEN_WIDTH=1920
|
||||
- SCREEN_HEIGHT=1024
|
||||
- SCREEN_DEPTH=16
|
||||
- ENABLE_DEBUGGER=false
|
||||
- PREBOOT_CHROME=true
|
||||
- CONNECTION_TIMEOUT=300000
|
||||
- MAX_CONCURRENT_SESSIONS=10
|
||||
- CHROME_REFRESH_TIME=600000
|
||||
- DEFAULT_BLOCK_ADS=true
|
||||
- DEFAULT_STEALTH=true
|
||||
volumes:
|
||||
changedetection_data:
|
||||
|
|
@ -1,2 +1,6 @@
|
|||
---
|
||||
changedetection_version: 0.47.06
|
||||
# This isn't preferable, i'd rather pin a version. However
|
||||
# it's quite hard to find a suitable candidate (https://hub.docker.com/r/browserless/chrome/tags)
|
||||
# for arm64.
|
||||
browserless_chrome_version: latest
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue