From 7565cddaca141529f3675f9608d6eab41daa0745 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Wed, 28 Dec 2022 09:57:07 +0200 Subject: [PATCH] Add hourly restart of invidious --- defaults/main.yml | 1 + tasks/configure.yml | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 8c10051..ceb3bfc 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -2,6 +2,7 @@ invidious_repository: https://github.com/iv-org/invidious.git invidious_folder: /srv/invidious invidious_hostname: invidious.example.com +invidious_project_name: invidious invidious_internal_port: 3000 #handle_ufw will allow access to individious_internal_port from everywhere, use it only if Invidious handles SSL or you don't want to use SSL (what?) handle_ufw: false diff --git a/tasks/configure.yml b/tasks/configure.yml index e7cb224..9b3bfdb 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -16,7 +16,7 @@ - name: Ensure composition is up community.docker.docker_compose: - project_name: "{{ invidious_hostname }}" + project_name: "{{ invidious_project_name }}" project_src: "{{ invidious_folder }}" - name: Ensure UFW allows port access @@ -24,3 +24,9 @@ rule: allow port: "{{ invidious_internal_port }}" when: handle_ufw + +- name: Ensure Invidious is restarted every hour + cron: + name: restart_invidious + job: "docker container restart {{ invidious_project_name }}_invidious_1" + minute: 56