Adds Redis cache

This commit is contained in:
Jan Beilicke 2023-10-29 19:34:26 +01:00
parent 13e163913a
commit dae125dc77
2 changed files with 21 additions and 0 deletions

View file

@ -69,6 +69,17 @@
SMTP_PASSWORD={{ smtp_password }}
MAIL_FROM_ADDRESS={{ mail_from_address }}
MAIL_DOMAIN={{ mail_domain }}
REDIS_HOST=redis
REDIS_HOST_PASSWORD={{ redis_host_password }}
- name: Provide Redis env vars
copy:
dest: /home/{{ docker_user }}/nextcloud/redis.env
owner: "{{ docker_user }}"
group: "{{ docker_user }}"
mode: '0640'
content: |
REDIS_PASSWORD={{ redis_host_password }}
- name: Provide restic-compose-backup env vars
copy:

View file

@ -25,12 +25,21 @@ services:
container_name: nextcloud-app
depends_on:
- mysqldb
- redis
volumes:
- nextcloud:/var/www/html
- /etc/localtime:/etc/localtime:ro
env_file:
- nextcloud.env
redis:
image: bitnami/redis:latest
restart: unless-stopped
volumes:
- redis:/data
env_file:
- redis.env
web:
image: nginx
restart: always
@ -85,6 +94,7 @@ services:
volumes:
mysqldb:
redis:
nextcloud:
{% if nextcloud_enable_restic_compose_backup %}
backup-cache: