docker-compose.yml 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. # Usage:
  2. # docker compose run archivebox init --setup
  3. # docker compose up
  4. # echo "https://example.com" | docker compose run archivebox archivebox add
  5. # docker compose run archivebox add --depth=1 https://example.com/some/feed.rss
  6. # docker compose run archivebox config --set MEDIA_MAX_SIZE=750m
  7. # docker compose run archivebox help
  8. # Documentation:
  9. # https://github.com/ArchiveBox/ArchiveBox/wiki/Docker#docker-compose
  10. version: '3.9'
  11. services:
  12. archivebox:
  13. #image: ${DOCKER_IMAGE:-archivebox/archivebox:dev}
  14. image: archivebox/archivebox:dev
  15. command: server --quick-init 0.0.0.0:8000
  16. ports:
  17. - 8000:8000
  18. volumes:
  19. - ./data:/data
  20. # - ./etc/crontabs:/var/spool/cron/crontabs # uncomment this and archivebox_scheduler below to set up automatic recurring archive jobs
  21. # - ./archivebox:/app/archivebox # uncomment this to mount the ArchiveBox source code at runtime (for developers working on archivebox)
  22. # build: . # uncomment this to build the image from source code at buildtime (for developers working on archivebox)
  23. environment:
  24. - ALLOWED_HOSTS=* # restrict this to only accept incoming traffic via specific domain name
  25. # - PUBLIC_INDEX=True # set to False to prevent anonymous users from viewing snapshot list
  26. # - PUBLIC_SNAPSHOTS=True # set to False to prevent anonymous users from viewing snapshot content
  27. # - PUBLIC_ADD_VIEW=False # set to True to allow anonymous users to submit new URLs to archive
  28. # - ADMIN_USERNAME=admin # create an admin user on first run with the given user/pass combo
  29. # - ADMIN_PASSWORD=SomeSecretPassword
  30. # - PUID=911 # set to your host user's UID & GID if you encounter permissions issues
  31. # - PGID=911
  32. # - SEARCH_BACKEND_ENGINE=sonic # uncomment these and sonic container below for better full-text search
  33. # - SEARCH_BACKEND_HOST_NAME=sonic
  34. # - SEARCH_BACKEND_PASSWORD=SomeSecretPassword
  35. # - MEDIA_MAX_SIZE=750m # increase this filesize limit to allow archiving larger audio/video files
  36. # - TIMEOUT=60 # increase this number to 120+ seconds if you see many slow downloads timing out
  37. # - CHECK_SSL_VALIDITY=True # set to False to disable strict SSL checking (allows saving URLs w/ broken certs)
  38. # - SAVE_ARCHIVE_DOT_ORG=True # set to False to disable submitting all URLs to Archive.org when archiving
  39. # ...
  40. # add further configuration options from archivebox/config.py as needed (to apply them only to this container)
  41. # or set using `docker compose run archivebox config --set SOME_KEY=someval` (to persist config across all containers)
  42. # For ad-blocking during archiving, uncomment this section and pihole service section below
  43. # networks:
  44. # - dns
  45. # dns:
  46. # - 172.20.0.53
  47. ######## Optional Addons: tweak examples below as needed for your specific use case ########
  48. ### Example: To run the Sonic full-text search backend, first download the config file to sonic.cfg
  49. # $ curl -O https://raw.githubusercontent.com/ArchiveBox/ArchiveBox/master/etc/sonic.cfg
  50. # After starting, backfill any existing Snapshots into the full-text index:
  51. # $ docker-compose run archivebox update --index-only
  52. # sonic:
  53. # image: valeriansaliou/sonic:latest
  54. # expose:
  55. # - 1491
  56. # environment:
  57. # - SEARCH_BACKEND_PASSWORD=SomeSecretPassword
  58. # volumes:
  59. # - ./sonic.cfg:/etc/sonic.cfg:ro
  60. # - ./data/sonic:/var/lib/sonic/store
  61. ### Example: To run pihole in order to block ad/tracker requests during archiving,
  62. # uncomment this block and set up pihole using its admin interface
  63. # pihole:
  64. # image: pihole/pihole:latest
  65. # ports:
  66. # - 127.0.0.1:8090:80 # uncomment to access the admin HTTP interface on http://localhost:8090
  67. # environment:
  68. # - WEBPASSWORD=SET_THIS_TO_SOME_SECRET_PASSWORD_FOR_ADMIN_DASHBOARD
  69. # - DNSMASQ_LISTENING=all
  70. # dns:
  71. # - 127.0.0.1
  72. # - 1.1.1.1
  73. # networks:
  74. # dns:
  75. # ipv4_address: 172.20.0.53
  76. # volumes:
  77. # - ./etc/pihole:/etc/pihole
  78. # - ./etc/dnsmasq:/etc/dnsmasq.d
  79. ### Example: Enable ability to run regularly scheduled archiving tasks by uncommenting this container
  80. # $ docker compose run archivebox schedule --every=day --depth=1 'https://example.com/some/rss/feed.xml'
  81. # then restart the scheduler container to apply the changes to the schedule
  82. # $ docker compose restart archivebox_scheduler
  83. # archivebox_scheduler:
  84. # image: ${DOCKER_IMAGE:-archivebox/archivebox:dev}
  85. # command: schedule --foreground
  86. # environment:
  87. # - MEDIA_MAX_SIZE=750m # increase this number to allow archiving larger audio/video files
  88. # # - TIMEOUT=60 # increase if you see timeouts often during archiving / on slow networks
  89. # # - ONLY_NEW=True # set to False to retry previously failed URLs when re-adding instead of skipping them
  90. # # - CHECK_SSL_VALIDITY=True # set to False to allow saving URLs w/ broken SSL certs
  91. # # - SAVE_ARCHIVE_DOT_ORG=True # set to False to disable submitting URLs to Archive.org when archiving
  92. # # - PUID=502 # set to your host user's UID & GID if you encounter permissions issues
  93. # # - PGID=20
  94. # volumes:
  95. # - ./data:/data
  96. # - ./etc/crontabs:/var/spool/cron/crontabs
  97. # # cpus: 2 # uncomment / edit these values to limit container resource consumption
  98. # # mem_limit: 2048m
  99. # # shm_size: 1024m
  100. ### Example: Put Nginx in front of the ArchiveBox server for SSL termination
  101. # nginx:
  102. # image: nginx:alpine
  103. # ports:
  104. # - 443:443
  105. # - 80:80
  106. # volumes:
  107. # - ./etc/nginx.conf:/etc/nginx/nginx.conf
  108. # - ./data:/var/www
  109. ### Example: run all your ArchiveBox traffic through a WireGuard VPN tunnel
  110. # wireguard:
  111. # image: linuxserver/wireguard:latest
  112. # network_mode: 'service:archivebox'
  113. # cap_add:
  114. # - NET_ADMIN
  115. # - SYS_MODULE
  116. # sysctls:
  117. # - net.ipv4.conf.all.rp_filter=2
  118. # - net.ipv4.conf.all.src_valid_mark=1
  119. # volumes:
  120. # - /lib/modules:/lib/modules
  121. # - ./wireguard.conf:/config/wg0.conf:ro
  122. ### Example: Run PYWB in parallel and auto-import WARCs from ArchiveBox
  123. # pywb:
  124. # image: webrecorder/pywb:latest
  125. # entrypoint: /bin/sh -c '(wb-manager init default || test $$? -eq 2) && wb-manager add default /archivebox/archive/*/warc/*.warc.gz; wayback;'
  126. # environment:
  127. # - INIT_COLLECTION=archivebox
  128. # ports:
  129. # - 8080:8080
  130. # volumes:
  131. # - ./data:/archivebox
  132. # - ./data/wayback:/webarchive
  133. networks:
  134. # network needed for pihole container to offer :53 dns resolving on fixed ip for archivebox container
  135. dns:
  136. ipam:
  137. driver: default
  138. config:
  139. - subnet: 172.20.0.0/24