store mastodon cache outside of backupable directory

This commit is contained in:
Pim Kunis 2023-01-11 00:19:14 +01:00
parent ecfb6b92f4
commit 898e9b1c16
2 changed files with 8 additions and 1 deletions

View file

@ -10,11 +10,16 @@
template:
src: "{{ role_path }}/templates/docker-compose.yml.j2"
dest: "{{ service_dir }}/docker-compose.yml"
- name: Create Mastodon data directory
- name: Create data directory
file:
path: "{{ data_dir }}"
state: directory
mode: 0777
- name: Create cache directory
file:
path: "{{ service_dir }}/cache"
state: directory
mode: 0777
- name: Start Docker Compose
docker_compose:
project_src: "{{ service_dir }}"

View file

@ -50,6 +50,7 @@ services:
- redis
volumes:
- {{ data_dir }}/public/system:/mastodon/public/system
- {{ service_dir }}/cache:/mastodon/public/system/cache
labels:
- traefik.http.routers.mastodon.entrypoints=websecure
- traefik.http.routers.mastodon.rule=Host(`social.pizzapim.nl`)
@ -97,6 +98,7 @@ services:
- default
volumes:
- {{ data_dir }}/public/system:/mastodon/public/system
- {{ service_dir }}/cache:/mastodon/public/system/cache
healthcheck:
test: ['CMD-SHELL', "ps aux | grep '[s]idekiq\ 6' || false"]