2019-02-28 13:59:52 -05:00
|
|
|
# Usage:
|
2021-04-05 23:17:07 -04:00
|
|
|
# docker-compose run archivebox init --setup
|
|
|
|
# docker-compose up
|
2020-06-25 21:30:29 -04:00
|
|
|
# echo "https://example.com" | docker-compose run archivebox archivebox add
|
2020-07-28 16:14:54 -04:00
|
|
|
# docker-compose run archivebox add --depth=1 https://example.com/some/feed.rss
|
|
|
|
# docker-compose run archivebox config --set PUBLIC_INDEX=True
|
2021-04-07 22:50:18 -04:00
|
|
|
# docker-compose run archivebox help
|
2019-02-28 13:59:52 -05:00
|
|
|
# Documentation:
|
2020-11-23 02:04:39 -05:00
|
|
|
# https://github.com/ArchiveBox/ArchiveBox/wiki/Docker#docker-compose
|
2019-02-28 13:59:52 -05:00
|
|
|
|
2021-12-16 05:18:33 -05:00
|
|
|
version: '2.4' # '3.9' or greater also works
|
2019-01-16 09:20:15 -05:00
|
|
|
|
|
|
|
services:
|
|
|
|
archivebox:
|
2021-02-15 14:53:03 -05:00
|
|
|
# build: . # for developers working on archivebox
|
2021-05-07 05:03:54 -04:00
|
|
|
image: ${DOCKER_IMAGE:-archivebox/archivebox:master}
|
2021-02-15 14:52:10 -05:00
|
|
|
command: server --quick-init 0.0.0.0:8000
|
2020-07-21 12:16:29 -04:00
|
|
|
ports:
|
|
|
|
- 8000:8000
|
2019-01-16 09:20:15 -05:00
|
|
|
environment:
|
2021-02-16 01:26:26 -05:00
|
|
|
- ALLOWED_HOSTS=* # add any config options you want as env vars
|
|
|
|
- MEDIA_MAX_SIZE=750m
|
2021-02-15 14:52:37 -05:00
|
|
|
# - SEARCH_BACKEND_ENGINE=sonic # uncomment these if you enable sonic below
|
2021-02-15 13:38:32 -05:00
|
|
|
# - SEARCH_BACKEND_HOST_NAME=sonic
|
|
|
|
# - SEARCH_BACKEND_PASSWORD=SecretPassword
|
2023-08-24 12:25:18 -04:00
|
|
|
- SAVE_GIT=False
|
|
|
|
- SAVE_MEDIA=False
|
2022-03-16 17:12:18 -04:00
|
|
|
# dns: # uncomment to use pihole below for ad/tracker blocking during archiving
|
|
|
|
# - pihole
|
2019-01-16 09:20:15 -05:00
|
|
|
volumes:
|
|
|
|
- ./data:/data
|
2021-02-15 14:52:37 -05:00
|
|
|
# - ./archivebox:/app/archivebox # for developers working on archivebox
|
2021-04-05 23:17:07 -04:00
|
|
|
|
2022-03-16 17:14:35 -04:00
|
|
|
|
|
|
|
### Optional Addons: tweak these examples as needed for your specific use case
|
|
|
|
|
2022-03-22 20:55:17 -04:00
|
|
|
### Example: To run the Sonic full-text search backend, first download the config file to sonic.cfg
|
2021-04-10 07:42:16 -04:00
|
|
|
# curl -O https://raw.githubusercontent.com/ArchiveBox/ArchiveBox/master/etc/sonic.cfg
|
2021-04-05 23:24:12 -04:00
|
|
|
# after starting, backfill any existing Snapshots into the index: docker-compose run archivebox update --index-only
|
2022-03-22 20:55:17 -04:00
|
|
|
|
2021-02-15 13:38:32 -05:00
|
|
|
# sonic:
|
2022-05-09 22:14:26 -04:00
|
|
|
# image: valeriansaliou/sonic:v1.3.1
|
2021-04-10 07:42:16 -04:00
|
|
|
# expose:
|
|
|
|
# - 1491
|
|
|
|
# environment:
|
|
|
|
# - SEARCH_BACKEND_PASSWORD=SecretPassword
|
|
|
|
# volumes:
|
|
|
|
# - ./sonic.cfg:/etc/sonic.cfg:ro
|
|
|
|
# - ./data/sonic:/var/lib/sonic/store
|
2022-03-16 17:12:18 -04:00
|
|
|
|
2022-03-22 20:55:17 -04:00
|
|
|
|
|
|
|
### Example: To run pihole in order to block ad/tracker requests during archiving,
|
|
|
|
# uncomment this block and set up pihole using its admin interface
|
|
|
|
|
2022-03-16 17:12:18 -04:00
|
|
|
# pihole:
|
2022-03-22 20:55:17 -04:00
|
|
|
# image: pihole/pihole:latest
|
|
|
|
# ports:
|
|
|
|
# - 80:80 # uncomment to access the admin HTTP interface on http://localhost:80
|
|
|
|
# environment:
|
|
|
|
# WEBPASSWORD: 'set a secure password here or it will be random'
|
|
|
|
# volumes:
|
|
|
|
# - ./data/pihole:/etc/pihole
|
|
|
|
# - ./data/dnsmasq:/etc/dnsmasq.d
|
|
|
|
|
|
|
|
|
|
|
|
### Example: Run scheduled imports in a docker instead of using cron on the
|
|
|
|
# host machine, add tasks and see more info with archivebox schedule --help
|
|
|
|
|
2020-07-29 19:48:56 -04:00
|
|
|
# scheduler:
|
2020-11-23 02:20:01 -05:00
|
|
|
# image: archivebox/archivebox:latest
|
2020-08-18 18:32:11 -04:00
|
|
|
# command: schedule --foreground --every=day --depth=1 'https://getpocket.com/users/USERNAME/feed/all'
|
2020-07-29 19:48:56 -04:00
|
|
|
# environment:
|
|
|
|
# - USE_COLOR=True
|
|
|
|
# - SHOW_PROGRESS=False
|
|
|
|
# volumes:
|
|
|
|
# - ./data:/data
|
2021-04-05 23:17:07 -04:00
|
|
|
|
2022-03-22 20:55:17 -04:00
|
|
|
|
|
|
|
### Example: Put Nginx in front of the ArchiveBox server for SSL termination
|
|
|
|
|
2020-07-29 18:37:34 -04:00
|
|
|
# nginx:
|
|
|
|
# image: nginx:alpine
|
|
|
|
# ports:
|
|
|
|
# - 443:443
|
|
|
|
# - 80:80
|
|
|
|
# volumes:
|
|
|
|
# - ./etc/nginx/nginx.conf:/etc/nginx/nginx.conf
|
|
|
|
# - ./data:/var/www
|
|
|
|
|
2022-03-22 20:55:17 -04:00
|
|
|
|
|
|
|
### Example: run all your ArchiveBox traffic through a WireGuard VPN tunnel
|
|
|
|
|
2020-07-29 18:37:34 -04:00
|
|
|
# wireguard:
|
|
|
|
# image: linuxserver/wireguard
|
|
|
|
# network_mode: 'service:archivebox'
|
|
|
|
# cap_add:
|
|
|
|
# - NET_ADMIN
|
|
|
|
# - SYS_MODULE
|
|
|
|
# sysctls:
|
|
|
|
# - net.ipv4.conf.all.rp_filter=2
|
|
|
|
# - net.ipv4.conf.all.src_valid_mark=1
|
|
|
|
# volumes:
|
|
|
|
# - /lib/modules:/lib/modules
|
|
|
|
# - ./wireguard.conf:/config/wg0.conf:ro
|
2021-04-05 23:17:07 -04:00
|
|
|
|
2022-03-22 20:55:17 -04:00
|
|
|
|
|
|
|
### Example: Run PYWB in parallel and auto-import WARCs from ArchiveBox
|
|
|
|
|
2020-07-28 06:01:06 -04:00
|
|
|
# pywb:
|
|
|
|
# image: webrecorder/pywb:latest
|
2022-04-05 22:58:40 -04:00
|
|
|
# entrypoint: /bin/sh -c '(wb-manager init default || test $$? -eq 2) && wb-manager add default /archivebox/archive/*/warc/*.warc.gz; wayback;'
|
2020-07-28 06:01:06 -04:00
|
|
|
# environment:
|
|
|
|
# - INIT_COLLECTION=archivebox
|
|
|
|
# ports:
|
|
|
|
# - 8080:8080
|
|
|
|
# volumes:
|
2022-01-27 13:24:59 -05:00
|
|
|
# - ./data:/archivebox
|
|
|
|
# - ./data/wayback:/webarchive
|