docker-compose.yml 7.2 KB

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