Add a script to rebuild the feeds if redis fails

This commit is contained in:
Waffles
2023-01-06 09:32:46 -08:00
parent 43f041b6ad
commit 7ec729d912
2 changed files with 14 additions and 0 deletions
+10
View File
@@ -39,6 +39,16 @@
dest: /home/mastodon/live/docker-compose.yml dest: /home/mastodon/live/docker-compose.yml
notify: "docker-compose up" notify: "docker-compose up"
- name: Install feed rebuild script
template:
src: feeds-build.sh.j2
dest: /usr/local/bin/feeds-build.sh
- name: Set permission of feeds-build.sh
file:
path: /usr/local/bin/feeds-build.sh
mode: '0755'
- import_tasks: redis.yml - import_tasks: redis.yml
when: ansible_hostname == REDIS_HOST when: ansible_hostname == REDIS_HOST
@@ -0,0 +1,4 @@
#!/bin/bash
# If we run this from cron, remove change to "docker exec -i" as we don't have an attached terminal
docker exec -it live-web-1 bin/tootctl feeds build --all