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