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
|
become: true
|
||||||
community.docker.docker_volume:
|
community.docker.docker_compose_v2:
|
||||||
name: changedetection_data
|
project_src: "/home/{{ ansible_user_id }}/changedetection/"
|
||||||
- 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
|
|
||||||
- name: Include simple-reverse-proxy role
|
- name: Include simple-reverse-proxy role
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: simple-reverse-proxy
|
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
|
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
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,8 @@
|
||||||
--agree-tos -m {{ administration_email }}
|
--agree-tos -m {{ administration_email }}
|
||||||
-d postgres.kleinendorst.info
|
-d postgres.kleinendorst.info
|
||||||
creates: "/etc/letsencrypt/live/postgres.kleinendorst.info"
|
creates: "/etc/letsencrypt/live/postgres.kleinendorst.info"
|
||||||
|
# TODO: Instead of creating a seperate postgres user specifically for storing
|
||||||
|
# the files we might also upload the compose to the default account and run from there.
|
||||||
- name: Create the compose project directory
|
- name: Create the compose project directory
|
||||||
become: true
|
become: true
|
||||||
become_user: "{{ postgres_unix_username }}"
|
become_user: "{{ postgres_unix_username }}"
|
||||||
|
|
@ -38,12 +40,11 @@
|
||||||
become: true
|
become: true
|
||||||
become_user: "{{ postgres_unix_username }}"
|
become_user: "{{ postgres_unix_username }}"
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: docker-compose.yml.j2
|
src: docker-compose.yaml.j2
|
||||||
dest: "/home/{{ postgres_unix_username }}/postgres/docker-compose.yml"
|
dest: "/home/{{ postgres_unix_username }}/postgres/docker-compose.yaml"
|
||||||
owner: "{{ postgres_unix_username }}"
|
owner: "{{ postgres_unix_username }}"
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
- name: Create and start services
|
- name: Create and start services
|
||||||
become: true
|
become: true
|
||||||
community.docker.docker_compose_v2:
|
community.docker.docker_compose_v2:
|
||||||
project_src: "/home/{{ postgres_unix_username }}/postgres/"
|
project_src: "/home/{{ postgres_unix_username }}/postgres/"
|
||||||
register: docker_compose_output
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue