add archivebox

This commit is contained in:
L4RM4ND
2023-12-07 02:11:51 +01:00
parent 37037ec4b1
commit 279a082899
4 changed files with 152 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
# References
- https://github.com/ArchiveBox/ArchiveBox
- https://github.com/ArchiveBox/ArchiveBox/blob/dev/docker-compose.yml
# Notes
Before starting the compose stack, ensure that you have downloaded the sonic configuration file, if you plan on using the sonic container.
Place the config file in the bind volume mount path for sonic.
The default username and password are: archivebox

View File

@@ -0,0 +1,72 @@
version: "3.9"
services:
archivebox:
image: archivebox/archivebox:dev
container_name: archivebox
command: server --quick-init 0.0.0.0:8000
restart: unless-stopped
ports:
- 8000:8000
expose:
- 8000
volumes:
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/archivebox/data:/data # archivebox application data
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/archivebox/crontabs:/var/spool/cron/crontabs # archivebox crontab data for scheduled runs
#- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/archivebox/source-code:/app/archivebox # bind mounts the archivebox source code for development
environment:
# see https://docs.archivebox.io/en/master/Configuration.html for more details
- ADMIN_USERNAME=archivebox # your initial username
- ADMIN_PASSWORD=archivebox # your initial password
- ALLOWED_HOSTS=*
- PUBLIC_INDEX=False
- PUBLIC_SNAPSHOTS=False
- PUBLIC_ADD_VIEW=False
- PUID=1000
- PGID=1000
- SEARCH_BACKEND_ENGINE=sonic
- SEARCH_BACKEND_HOST_NAME=sonic
- SEARCH_BACKEND_PASSWORD=deport-silver-showcase-pusher-radiantly
- MEDIA_MAX_SIZE=750m
- TIMEOUT=60
- CHECK_SSL_VALIDITY=False
- SAVE_ARCHIVE_DOT_ORG=False
#networks:
# - proxy
# - archivebox_default
#labels:
# - traefik.enable=true
# - traefik.docker.network=proxy
# - traefik.http.routers.archivebox.rule=Host(`archive.exmple.com`)
# - traefik.http.services.archivebox.loadbalancer.server.port=8000
# # Part for optional traefik middlewares
# - traefik.http.routers.archivebox.middlewares=local-ipwhitelist@file
### 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
container_name: archivebox-sonic
expose:
- 1491
environment:
- SEARCH_BACKEND_PASSWORD=deport-silver-showcase-pusher-radiantly
volumes:
# Example: To run the Sonic full-text search backend, first download the config file to sonic.cfg
# curl https://raw.githubusercontent.com/ArchiveBox/ArchiveBox/master/etc/sonic.cfg -o /mnt/docker-volumes/archivebox/sonic/sonic.cfg
# After starting, backfill any existing Snapshots into the full-text index:
# $ docker-compose run archivebox update --index-only
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/archivebox/sonic/sonic.cfg:/etc/sonic.cfg:ro
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/archivebox/sonic/store:/var/lib/sonic/store
#networks:
# - archivebox_default
#networks:
# proxy:
# external: true
# archivebox_default:
# external: false

View 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 = "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