2019-02-28 13:59:52 -05:00
|
|
|
# Usage:
|
2023-06-13 20:13:55 -04:00
|
|
|
# docker compose run archivebox init --setup
|
|
|
|
# docker compose up
|
|
|
|
# echo "https://example.com" | docker compose run archivebox archivebox add
|
|
|
|
# docker compose run archivebox add --depth=1 https://example.com/some/feed.rss
|
|
|
|
# docker compose run archivebox config --set MEDIA_MAX_SIZE=750m
|
|
|
|
# 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
|
|
|
|
2023-06-13 20:13:55 -04:00
|
|
|
version: '3.9'
|
2019-01-16 09:20:15 -05:00
|
|
|
|
|
|
|
services:
|
|
|
|
archivebox:
|
2024-01-02 20:09:31 -05:00
|
|
|
#image: ${DOCKER_IMAGE:-archivebox/archivebox:dev}
|
|
|
|
image: archivebox:dev
|
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
|
2023-06-13 20:13:55 -04:00
|
|
|
volumes:
|
|
|
|
- ./data:/data
|
|
|
|
# - ./etc/crontabs:/var/spool/cron/crontabs # uncomment this and archivebox_scheduler below to set up automatic recurring archive jobs
|
|
|
|
# - ./archivebox:/app/archivebox # uncomment this to mount the ArchiveBox source code at runtime (for developers working on archivebox)
|
|
|
|
# build: . # uncomment this to build the image from source code at buildtime (for developers working on archivebox)
|
2019-01-16 09:20:15 -05:00
|
|
|
environment:
|
2023-06-13 20:13:55 -04:00
|
|
|
- ALLOWED_HOSTS=* # restrict this to only accept incoming traffic via specific domain name
|
|
|
|
# - PUBLIC_INDEX=True # set to False to prevent anonymous users from viewing snapshot list
|
|
|
|
# - PUBLIC_SNAPSHOTS=True # set to False to prevent anonymous users from viewing snapshot content
|
|
|
|
# - PUBLIC_ADD_VIEW=False # set to True to allow anonymous users to submit new URLs to archive
|
2023-10-18 14:53:13 -04:00
|
|
|
# - ADMIN_USERNAME=admin # create an admin user on first run with the given user/pass combo
|
|
|
|
# - ADMIN_PASSWORD=SomeSecretPassword
|
2023-11-08 03:14:05 -05:00
|
|
|
# - PUID=911 # set to your host user's UID & GID if you encounter permissions issues
|
|
|
|
# - PGID=911
|
2023-06-13 20:13:55 -04:00
|
|
|
# - SEARCH_BACKEND_ENGINE=sonic # uncomment these and sonic container below for better full-text search
|
2021-02-15 13:38:32 -05:00
|
|
|
# - SEARCH_BACKEND_HOST_NAME=sonic
|
2023-06-13 08:49:22 -04:00
|
|
|
# - SEARCH_BACKEND_PASSWORD=SomeSecretPassword
|
2023-11-08 03:14:05 -05:00
|
|
|
# - MEDIA_MAX_SIZE=750m # increase this filesize limit to allow archiving larger audio/video files
|
|
|
|
# - TIMEOUT=60 # increase this number to 120+ seconds if you see many slow downloads timing out
|
|
|
|
# - CHECK_SSL_VALIDITY=True # set to False to disable strict SSL checking (allows saving URLs w/ broken certs)
|
|
|
|
# - SAVE_ARCHIVE_DOT_ORG=True # set to False to disable submitting all URLs to Archive.org when archiving
|
2023-06-13 20:13:55 -04:00
|
|
|
# ...
|
|
|
|
# add further configuration options from archivebox/config.py as needed (to apply them only to this container)
|
|
|
|
# or set using `docker compose run archivebox config --set SOME_KEY=someval` (to persist config across all containers)
|
2023-11-08 03:14:05 -05:00
|
|
|
|
|
|
|
# For ad-blocking during archiving, uncomment this section and pihole service section below
|
|
|
|
# networks:
|
|
|
|
# - dns
|
|
|
|
# dns:
|
|
|
|
# - 172.20.0.53
|
2021-04-05 23:17:07 -04:00
|
|
|
|
2022-03-16 17:14:35 -04:00
|
|
|
|
2023-06-13 20:13:55 -04:00
|
|
|
######## Optional Addons: tweak examples below as needed for your specific use case ########
|
2022-03-16 17:14:35 -04:00
|
|
|
|
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
|
2023-06-13 20:13:55 -04:00
|
|
|
# $ 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
|
2022-03-22 20:55:17 -04:00
|
|
|
|
2021-02-15 13:38:32 -05:00
|
|
|
# sonic:
|
2023-06-13 08:49:22 -04:00
|
|
|
# image: valeriansaliou/sonic:latest
|
2021-04-10 07:42:16 -04:00
|
|
|
# expose:
|
|
|
|
# - 1491
|
|
|
|
# environment:
|
2023-06-13 08:49:22 -04:00
|
|
|
# - SEARCH_BACKEND_PASSWORD=SomeSecretPassword
|
2021-04-10 07:42:16 -04:00
|
|
|
# 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:
|
2023-11-08 03:14:05 -05:00
|
|
|
# - 127.0.0.1:8090:80 # uncomment to access the admin HTTP interface on http://localhost:8090
|
2022-03-22 20:55:17 -04:00
|
|
|
# environment:
|
2023-06-13 20:13:55 -04:00
|
|
|
# - WEBPASSWORD=SET_THIS_TO_SOME_SECRET_PASSWORD_FOR_ADMIN_DASHBOARD
|
2023-11-08 03:14:05 -05:00
|
|
|
# - DNSMASQ_LISTENING=all
|
|
|
|
# dns:
|
|
|
|
# - 127.0.0.1
|
|
|
|
# - 1.1.1.1
|
|
|
|
# networks:
|
|
|
|
# dns:
|
|
|
|
# ipv4_address: 172.20.0.53
|
2022-03-22 20:55:17 -04:00
|
|
|
# volumes:
|
2023-06-13 20:13:55 -04:00
|
|
|
# - ./etc/pihole:/etc/pihole
|
|
|
|
# - ./etc/dnsmasq:/etc/dnsmasq.d
|
2022-03-22 20:55:17 -04:00
|
|
|
|
|
|
|
|
2023-06-13 20:13:55 -04:00
|
|
|
### Example: Enable ability to run regularly scheduled archiving tasks by uncommenting this container
|
|
|
|
# $ docker compose run archivebox schedule --every=day --depth=1 'https://example.com/some/rss/feed.xml'
|
|
|
|
# then restart the scheduler container to apply the changes to the schedule
|
|
|
|
# $ docker compose restart archivebox_scheduler
|
2022-03-22 20:55:17 -04:00
|
|
|
|
2023-06-13 20:13:55 -04:00
|
|
|
# archivebox_scheduler:
|
2023-06-13 08:49:22 -04:00
|
|
|
# image: ${DOCKER_IMAGE:-archivebox/archivebox:dev}
|
2023-06-13 20:13:55 -04:00
|
|
|
# command: schedule --foreground
|
2020-07-29 19:48:56 -04:00
|
|
|
# environment:
|
2023-06-13 20:13:55 -04:00
|
|
|
# - MEDIA_MAX_SIZE=750m # increase this number to allow archiving larger audio/video files
|
|
|
|
# # - TIMEOUT=60 # increase if you see timeouts often during archiving / on slow networks
|
|
|
|
# # - ONLY_NEW=True # set to False to retry previously failed URLs when re-adding instead of skipping them
|
|
|
|
# # - CHECK_SSL_VALIDITY=True # set to False to allow saving URLs w/ broken SSL certs
|
|
|
|
# # - SAVE_ARCHIVE_DOT_ORG=True # set to False to disable submitting URLs to Archive.org when archiving
|
|
|
|
# # - PUID=502 # set to your host user's UID & GID if you encounter permissions issues
|
|
|
|
# # - PGID=20
|
2020-07-29 19:48:56 -04:00
|
|
|
# volumes:
|
|
|
|
# - ./data:/data
|
2023-06-13 20:13:55 -04:00
|
|
|
# - ./etc/crontabs:/var/spool/cron/crontabs
|
|
|
|
# # cpus: 2 # uncomment / edit these values to limit container resource consumption
|
|
|
|
# # mem_limit: 2048m
|
|
|
|
# # shm_size: 1024m
|
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:
|
2023-06-13 20:13:55 -04:00
|
|
|
# - ./etc/nginx.conf:/etc/nginx/nginx.conf
|
2020-07-29 18:37:34 -04:00
|
|
|
# - ./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:
|
2023-06-13 08:49:22 -04:00
|
|
|
# image: linuxserver/wireguard:latest
|
2020-07-29 18:37:34 -04:00
|
|
|
# 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
|
2023-11-08 03:14:05 -05:00
|
|
|
|
|
|
|
|
|
|
|
networks:
|
|
|
|
|
|
|
|
# network needed for pihole container to offer :53 dns resolving on fixed ip for archivebox container
|
|
|
|
dns:
|
|
|
|
ipam:
|
|
|
|
driver: default
|
|
|
|
config:
|
2023-11-14 05:04:49 -05:00
|
|
|
- subnet: 172.20.0.0/24
|