Add working redis for searx

This commit is contained in:
Marko Korhonen 2022-08-15 13:52:10 +03:00
parent 581dbdb22c
commit 7c1b22e57f
No known key found for this signature in database
GPG key ID: 911B85FBC6003FE5
2 changed files with 23 additions and 14 deletions

View file

@ -0,0 +1,16 @@
[services.redis]
image = "redis:alpine"
container_name = "redis"
user = "root"
command = "redis-server /etc/redis.conf"
restart = "unless-stopped"
volumes = ["/docker/redis/redis.conf:/etc/redis.conf", "redis_temp:/tmp/redis"]
[services.redis_temp]
image = "busybox"
container_name = "redis_temp"
command = "chmod -R 777 /tmp/redis"
volumes = ["redis_temp:/tmp/redis"]
[volumes.redis_temp]
external = true

View file

@ -1,13 +1,13 @@
version = "3.7"
[services]
[services.searx]
container_name = "searx"
image = "searxng/searxng:latest"
restart = "unless-stopped"
networks = ["searx", "proxy"]
volumes = ["/docker/searx:/etc/searxng:rw"]
volumes = [
"/docker/searx:/etc/searxng",
"redis_temp:/tmp/redis",
#"/docker/searx/logo.png:/usr/local/searxng/searx/static/themes/simple/img/searxng.png:ro"
]
environment = ["SEARXNG_BASE_URL=https://search.korhonen.cc/"]
cap_drop = ["ALL"]
cap_add = ["CHOWN", "SETGID", "SETUID", "DAC_OVERRIDE"]
@ -31,15 +31,8 @@ driver = "json-file"
max-size = "1m"
max-file = "1"
[services.redis]
container_name = "redis-searx"
image = "redis:alpine"
restart = "unless-stopped"
command = "redis-server --save \"\" --appendonly \"no\""
networks = ["searx"]
tmpfs = ["/var/lib/redis"]
cap_drop = ["ALL"]
cap_add = ["SETGID", "SETUID", "DAC_OVERRIDE"]
[volumes.redis_temp]
external = true
[networks.searx.ipam]
driver = "default"