Persist Redis DB
This commit is contained in:
parent
13d50e71f6
commit
026ca8bc45
|
@ -2,22 +2,30 @@
|
|||
---
|
||||
- name: Create SearXNG volume directory
|
||||
ansible.builtin.file:
|
||||
path: "{{ services.searxng.volume }}"
|
||||
path: "{{ services.searxng.volume }}/searxng"
|
||||
owner: root
|
||||
mode: u=rwx,g=rx,o=rx
|
||||
state: directory
|
||||
|
||||
- name: Create SearXNG volume directory for Redis
|
||||
ansible.builtin.file:
|
||||
path: "{{ services.searxng.volume }}/redis"
|
||||
owner: '999'
|
||||
group: '1000'
|
||||
mode: u=rwx,g=rx,o=rx
|
||||
state: directory
|
||||
|
||||
- name: Copy SearXNG settings.yml file
|
||||
ansible.builtin.template:
|
||||
src: settings.yml.j2
|
||||
dest: "{{ services.searxng.volume }}/settings.yml"
|
||||
dest: "{{ services.searxng.volume }}/searxng/settings.yml"
|
||||
owner: root
|
||||
mode: u=rw,g=r,o=r
|
||||
|
||||
- name: Copy SearXNG limiter.toml file
|
||||
ansible.builtin.template:
|
||||
src: limiter.toml.j2
|
||||
dest: "{{ services.searxng.volume }}/limiter.toml"
|
||||
dest: "{{ services.searxng.volume }}/searxng/limiter.toml"
|
||||
owner: root
|
||||
mode: u=rw,g=r,o=r
|
||||
|
||||
|
@ -46,12 +54,12 @@
|
|||
aliases:
|
||||
- searxng
|
||||
volumes:
|
||||
- "{{ services.searxng.volume }}:/etc/searxng:rw"
|
||||
- "{{ services.searxng.volume }}/searxng:/etc/searxng:rw"
|
||||
cap_add:
|
||||
- chown
|
||||
- dac_override
|
||||
- setuid
|
||||
- setgid
|
||||
- dac_override
|
||||
cap_drop:
|
||||
- all
|
||||
logging:
|
||||
|
@ -63,13 +71,13 @@
|
|||
redis:
|
||||
image: redis:{{ services.searxng.redis_version }}
|
||||
restart: always
|
||||
command: redis-server --save "" --appendonly "no"
|
||||
tmpfs:
|
||||
- /var/lib/redis
|
||||
command: redis-server --save 60 1 --appendonly no
|
||||
volumes:
|
||||
- "{{ services.searxng.volume }}/redis:/data:rw"
|
||||
cap_add:
|
||||
- dac_override
|
||||
- setuid
|
||||
- setgid
|
||||
- dac_override
|
||||
cap_drop:
|
||||
- all
|
||||
|
||||
|
|
Reference in a new issue