separated archivebox and added sonic search
This commit is contained in:
15
archivebox/.env
Executable file
15
archivebox/.env
Executable file
@@ -0,0 +1,15 @@
|
||||
#GLOBAL SETTINGS
|
||||
COMPOSE_HTTP_TIMEOUT=120
|
||||
COMPOSE_IGNORE_ORPHANS=1
|
||||
DOCKER_CONFIGS=.
|
||||
DOCKERGID=999
|
||||
DOCKERHOSTNAME=DockerServer1
|
||||
DOCKERLOGGING_MAXFILE=10
|
||||
DOCKERLOGGING_MAXSIZE=200k
|
||||
PGID=1000
|
||||
PUID=1000
|
||||
UMASK=000
|
||||
TZ=America/Chicago
|
||||
BACKUP_DIR=/mnt/truenas-backups
|
||||
MEDIA_DIR=/mnt/truenas-media
|
||||
STORAGE_DIR=/mnt/truenas-storage
|
||||
56
archivebox/compose.yml
Normal file
56
archivebox/compose.yml
Normal file
@@ -0,0 +1,56 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
archivebox:
|
||||
container_name: archivebox
|
||||
image: archivebox/archivebox:dev
|
||||
command: server --quick-init 0.0.0.0:8000
|
||||
environment:
|
||||
- ALLOWED_HOSTS=*
|
||||
- MEDIA_MAX_SIZE=750m
|
||||
- PUBLIC_ADD_VIEW=True
|
||||
- PUBLIC_INDEX=True
|
||||
- PUBLIC_SNAPSHOTS=False
|
||||
- SAVE_TITLE=True
|
||||
- SAVE_FAVICON=True
|
||||
- SAVE_WGET=False
|
||||
- SAVE_WARC=False
|
||||
- SAVE_PDF=True
|
||||
- SAVE_SCREENSHOT=True
|
||||
- SAVE_DOM=False
|
||||
- SAVE_SINGLEFILE=True
|
||||
- SAVE_READABILITY=True
|
||||
- SAVE_MERCURY=False
|
||||
- SAVE_GIT=False
|
||||
- SAVE_MEDIA=False
|
||||
- SAVE_ARCHIVE_DOT_ORG=False
|
||||
- SEARCH_BACKEND_ENGINE=sonic
|
||||
- SEARCH_BACKEND_HOST_NAME=sonic
|
||||
- SEARCH_BACKEND_PASSWORD=eeXa7chux9sheiviep8thaw3Yel1te
|
||||
networks:
|
||||
- reverse-proxy
|
||||
ports:
|
||||
- 8000:8000
|
||||
restart: always
|
||||
volumes:
|
||||
- ${DOCKER_CONFIGS}/data:/data
|
||||
|
||||
### Example: To run the Sonic full-text search backend, first download the config file to sonic.cfg
|
||||
# $ curl -O https://raw.githubusercontent.com/ArchiveBox/ArchiveBox/master/etc/sonic.cfg
|
||||
# After starting, backfill any existing Snapshots into the full-text index:
|
||||
# $ docker-compose run archivebox update --index-only
|
||||
|
||||
sonic:
|
||||
image: valeriansaliou/sonic:latest
|
||||
expose:
|
||||
- 1491
|
||||
environment:
|
||||
- SEARCH_BACKEND_PASSWORD=eeXa7chux9sheiviep8thaw3Yel1te
|
||||
volumes:
|
||||
- ${DOCKER_CONFIGS}/sonic.cfg:/etc/sonic.cfg:ro
|
||||
- ${DOCKER_CONFIGS}/data/sonic:/var/lib/sonic/store
|
||||
|
||||
networks:
|
||||
reverse-proxy:
|
||||
name: reverse-proxy
|
||||
external: true
|
||||
65
archivebox/sonic.cfg
Normal file
65
archivebox/sonic.cfg
Normal file
@@ -0,0 +1,65 @@
|
||||
# Sonic
|
||||
# Fast, lightweight and schema-less search backend
|
||||
# Configuration file
|
||||
# Example: https://github.com/valeriansaliou/sonic/blob/master/config.cfg
|
||||
|
||||
[server]
|
||||
|
||||
log_level = "warn"
|
||||
|
||||
|
||||
[channel]
|
||||
|
||||
inet = "0.0.0.0:1491"
|
||||
tcp_timeout = 300
|
||||
|
||||
auth_password = "${env.SEARCH_BACKEND_PASSWORD}"
|
||||
|
||||
[channel.search]
|
||||
|
||||
query_limit_default = 65535
|
||||
query_limit_maximum = 65535
|
||||
query_alternates_try = 10
|
||||
|
||||
suggest_limit_default = 5
|
||||
suggest_limit_maximum = 20
|
||||
|
||||
|
||||
[store]
|
||||
|
||||
[store.kv]
|
||||
|
||||
path = "/var/lib/sonic/store/kv/"
|
||||
|
||||
retain_word_objects = 100000
|
||||
|
||||
[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
|
||||
Reference in New Issue
Block a user