mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-06-06 17:41:33 -04:00
Add sonic to docker-compose
This commit is contained in:
parent
0f7dba07df
commit
0773f12034
2 changed files with 77 additions and 0 deletions
|
@ -21,8 +21,19 @@ services:
|
||||||
environment:
|
environment:
|
||||||
- USE_COLOR=True
|
- USE_COLOR=True
|
||||||
- SHOW_PROGRESS=False
|
- SHOW_PROGRESS=False
|
||||||
|
- SEARCH_BACKEND_HOST_NAME=sonic
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/data
|
- ./data:/data
|
||||||
|
depends_on:
|
||||||
|
- sonic
|
||||||
|
sonic:
|
||||||
|
image: valeriansaliou/sonic:v1.3.0
|
||||||
|
ports:
|
||||||
|
- 1491:1491
|
||||||
|
volumes:
|
||||||
|
- ./etc/sonic/config.cfg:/etc/sonic.cfg
|
||||||
|
- ./data:/var/lib/sonic/store/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Optional Addons: tweak these examples as needed for your specific use case
|
# Optional Addons: tweak these examples as needed for your specific use case
|
||||||
|
|
66
etc/sonic/config.cfg
Normal file
66
etc/sonic/config.cfg
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
# Sonic
|
||||||
|
# Fast, lightweight and schema-less search backend
|
||||||
|
# Configuration file
|
||||||
|
# Example: https://github.com/valeriansaliou/sonic/blob/master/config.cfg
|
||||||
|
|
||||||
|
|
||||||
|
[server]
|
||||||
|
|
||||||
|
log_level = "debug"
|
||||||
|
|
||||||
|
|
||||||
|
[channel]
|
||||||
|
|
||||||
|
inet = "0.0.0.0:1491"
|
||||||
|
tcp_timeout = 300
|
||||||
|
|
||||||
|
auth_password = "SecretPassword"
|
||||||
|
|
||||||
|
[channel.search]
|
||||||
|
|
||||||
|
query_limit_default = 10
|
||||||
|
query_limit_maximum = 100
|
||||||
|
query_alternates_try = 4
|
||||||
|
|
||||||
|
suggest_limit_default = 5
|
||||||
|
suggest_limit_maximum = 20
|
||||||
|
|
||||||
|
|
||||||
|
[store]
|
||||||
|
|
||||||
|
[store.kv]
|
||||||
|
|
||||||
|
path = "/var/lib/sonic/store/kv/"
|
||||||
|
|
||||||
|
retain_word_objects = 1000
|
||||||
|
|
||||||
|
[store.kv.pool]
|
||||||
|
|
||||||
|
inactive_after = 1800
|
||||||
|
|
||||||
|
[store.kv.database]
|
||||||
|
|
||||||
|
flush_after = 900
|
||||||
|
|
||||||
|
compress = true
|
||||||
|
parallelism = 2
|
||||||
|
max_files = 100
|
||||||
|
max_compactions = 1
|
||||||
|
max_flushes = 1
|
||||||
|
write_buffer = 16384
|
||||||
|
write_ahead_log = true
|
||||||
|
|
||||||
|
[store.fst]
|
||||||
|
|
||||||
|
path = "/var/lib/sonic/store/fst/"
|
||||||
|
|
||||||
|
[store.fst.pool]
|
||||||
|
|
||||||
|
inactive_after = 300
|
||||||
|
|
||||||
|
[store.fst.graph]
|
||||||
|
|
||||||
|
consolidate_after = 180
|
||||||
|
|
||||||
|
max_size = 2048
|
||||||
|
max_words = 250000
|
Loading…
Add table
Add a link
Reference in a new issue