docker-compose.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # This docker-compose config for ArchiveBox runs the following containers:
  2. # - ArchiveBox (it creates the initial archive, then sleeps forever to allow commands to be run with exec to add links)
  3. # - nginx webserver running on https://127.0.0.1:8098
  4. # Usage:
  5. # docker-compose up -d
  6. # echo "https://example.com" | docker-compose exec -T archivebox /bin/archive
  7. # docker-compose exec archivebox /bin/archive https://example.com/some/feed.rss
  8. # Documentation:
  9. # https://github.com/pirate/ArchiveBox/wiki/Docker#docker-compose
  10. version: '3'
  11. services:
  12. archivebox:
  13. build: . # replace this with nikisweeting/archivebox to use the docker-compose.yml file as a standalone file without avoid having to clone the repo
  14. stdin_open: true # needed to be able to input URLs directly after `docker-compose up`
  15. tty: true # needed to be able to pipe in URLs via stdin to `docker-compose exec ...`
  16. # env_file: path/to/your/ArchiveBox.conf # this feature is available starting >v0.4
  17. environment:
  18. - USE_COLOR=False # make docker logs nicer by not spamming lots of ANSI colors
  19. - SHOW_PROGRESS=False # make docker logs nicer by not writing lots of progress bar lines
  20. volumes:
  21. - ./data:/data
  22. command: bash -c 'echo "https://github.com/pirate/ArchiveBox" | /bin/archive; tail -f /dev/null' # archive the Github repo homepage as a starting point so the index doesn't just show an empty list to new users
  23. nginx:
  24. image: 'nginx'
  25. ports:
  26. - '8098:80'
  27. volumes:
  28. - ./etc/nginx/nginx.conf:/etc/nginx/nginx.conf
  29. - ./data:/var/www
  30. # you can also use named volumes / network volumes if you prefer them to simple local mounts
  31. # volumes:
  32. # archivebox-data:
  33. # archivebox-config:
  34. # etc. a full example will be added after the v0.4 release