You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
2.2 KiB

  1. # docker-compose file for running paperless from the Docker Hub.
  2. # This file contains everything paperless needs to run.
  3. # Paperless supports amd64, arm and arm64 hardware.
  4. #
  5. # All compose files of paperless configure paperless in the following way:
  6. #
  7. # - Paperless is (re)started on system boot, if it was running before shutdown.
  8. # - Docker volumes for storing data are managed by Docker.
  9. # - Folders for importing and exporting files are created in the same directory
  10. # as this file and mounted to the correct folders inside the container.
  11. # - Paperless listens on port 8000.
  12. #
  13. # In addition to that, this docker-compose file adds the following optional
  14. # configurations:
  15. #
  16. # - Instead of SQLite (default), PostgreSQL is used as the database server.
  17. #
  18. # To install and update paperless with this file, do the following:
  19. #
  20. # - Copy this file as 'docker-compose.yml' and the files 'docker-compose.env'
  21. # and '.env' into a folder.
  22. # - Run 'docker-compose pull'.
  23. # - Run 'docker-compose run --rm webserver createsuperuser' to create a user.
  24. # - Run 'docker-compose up -d'.
  25. #
  26. # For more extensive installation and update instructions, refer to the
  27. # documentation.
  28. version: "3.4"
  29. services:
  30. broker:
  31. image: redis:6.0
  32. restart: unless-stopped
  33. db:
  34. image: postgres:13
  35. restart: unless-stopped
  36. volumes:
  37. - pgdata:/var/lib/postgresql/data
  38. environment:
  39. POSTGRES_DB: paperless
  40. POSTGRES_USER: paperless
  41. POSTGRES_PASSWORD: paperless
  42. webserver:
  43. image: jonaswinkler/paperless-ng:latest
  44. restart: unless-stopped
  45. depends_on:
  46. - db
  47. - broker
  48. ports:
  49. - 8800:8000
  50. healthcheck:
  51. test: ["CMD", "curl", "-f", "http://localhost:8000"]
  52. interval: 30s
  53. timeout: 10s
  54. retries: 5
  55. volumes:
  56. - data:/usr/src/paperless/data
  57. - media:/usr/src/paperless/media
  58. - ./export:/usr/src/paperless/export
  59. - ./consume:/usr/src/paperless/consume
  60. env_file: docker-compose.env
  61. environment:
  62. PAPERLESS_REDIS: redis://broker:6379
  63. PAPERLESS_DBHOST: db
  64. volumes:
  65. data:
  66. media:
  67. pgdata: