Advertisement
Pheggas

Untitled

May 13th, 2022
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.96 KB | None | 0 0
  1. version: '3.5'
  2.  
  3. # Example Docker Compose config file for PhotoPrism (Linux / AMD64)
  4. #
  5. # Note:
  6. # - Running PhotoPrism on a server with less than 4 GB of swap space or setting a memory/swap limit can cause unexpected
  7. # restarts ("crashes"), for example, when the indexer temporarily needs more memory to process large files.
  8. # - If you install PhotoPrism on a public server outside your home network, please always run it behind a secure
  9. # HTTPS reverse proxy such as Traefik or Caddy. Your files and passwords will otherwise be transmitted
  10. # in clear text and can be intercepted by anyone, including your provider, hackers, and governments:
  11. # https://docs.photoprism.app/getting-started/proxies/traefik/
  12. #
  13. # Documentation : https://docs.photoprism.app/getting-started/docker-compose/
  14. # Docker Hub URL: https://hub.docker.com/r/photoprism/photoprism/
  15. #
  16. # DOCKER COMPOSE COMMAND REFERENCE
  17. # see https://docs.photoprism.app/getting-started/docker-compose/#command-line-interface
  18. # --------------------------------------------------------------------------
  19. # Start | docker-compose up -d
  20. # Stop | docker-compose stop
  21. # Update | docker-compose pull
  22. # Logs | docker-compose logs --tail=25 -f
  23. # Terminal | docker-compose exec photoprism bash
  24. # Help | docker-compose exec photoprism photoprism help
  25. # Config | docker-compose exec photoprism photoprism config
  26. # Reset | docker-compose exec photoprism photoprism reset
  27. # Backup | docker-compose exec photoprism photoprism backup -a -i
  28. # Restore | docker-compose exec photoprism photoprism restore -a -i
  29. # Index | docker-compose exec photoprism photoprism index
  30. # Reindex | docker-compose exec photoprism photoprism index -f
  31. # Import | docker-compose exec photoprism photoprism import
  32. #
  33. # To search originals for faces without a complete rescan:
  34. # docker-compose exec photoprism photoprism faces index
  35. #
  36. # All commands may have to be prefixed with "sudo" when not running as root.
  37. # This will point the home directory shortcut ~ to /root in volume mounts.
  38.  
  39. services:
  40. photoprism:
  41. ## Use photoprism/photoprism:preview for testing preview builds:
  42. image: photoprism/photoprism:latest
  43. depends_on:
  44. - mariadb
  45. ## Don't enable automatic restarts until PhotoPrism has been properly configured and tested!
  46. ## If the service gets stuck in a restart loop, this points to a memory, filesystem, network, or database issue:
  47. ## https://docs.photoprism.app/getting-started/troubleshooting/#fatal-server-errors
  48. # restart: unless-stopped
  49. security_opt:
  50. - seccomp:unconfined
  51. - apparmor:unconfined
  52. ports:
  53. - "4010:2342" # HTTP port (host:container)
  54. environment:
  55. PHOTOPRISM_ADMIN_PASSWORD: "password1" # !!! PLEASE CHANGE YOUR INITIAL "admin" PASSWORD !!!
  56. PHOTOPRISM_SITE_URL: "http://localhost:4010/" # public server URL incl http:// or https:// and /path, :port is optional
  57. PHOTOPRISM_ORIGINALS_LIMIT: 30000 # file size limit for originals in MB (increase for high-res video)
  58. PHOTOPRISM_HTTP_COMPRESSION: "gzip" # improves transfer speed and bandwidth utilization (none or gzip)
  59. PHOTOPRISM_DEBUG: "false" # run in debug mode (shows additional log messages)
  60. PHOTOPRISM_PUBLIC: "false" # no authentication required (disables password protection)
  61. PHOTOPRISM_READONLY: "false" # don't modify originals directory (reduced functionality)
  62. PHOTOPRISM_EXPERIMENTAL: "false" # enables experimental features
  63. PHOTOPRISM_DISABLE_CHOWN: "false" # disables storage permission updates on startup
  64. PHOTOPRISM_DISABLE_WEBDAV: "false" # disables built-in WebDAV server
  65. PHOTOPRISM_DISABLE_SETTINGS: "false" # disables Settings in Web UI
  66. PHOTOPRISM_DISABLE_TENSORFLOW: "false" # disables all features depending on TensorFlow
  67. PHOTOPRISM_DISABLE_FACES: "false" # disables facial recognition
  68. PHOTOPRISM_DISABLE_CLASSIFICATION: "false" # disables image classification
  69. PHOTOPRISM_DARKTABLE_PRESETS: "false" # enables Darktable presets and disables concurrent RAW conversion
  70. PHOTOPRISM_DETECT_NSFW: "false" # flag photos as private that MAY be offensive (requires TensorFlow)
  71. PHOTOPRISM_UPLOAD_NSFW: "true" # allows uploads that MAY be offensive
  72. # PHOTOPRISM_DATABASE_DRIVER: "sqlite" # SQLite is an embedded database that doesn't require a server
  73. PHOTOPRISM_DATABASE_DRIVER: "mysql" # use MariaDB 10.5+ or MySQL 8+ instead of SQLite for improved performance
  74. PHOTOPRISM_DATABASE_SERVER: "mariadb:3306" # MariaDB or MySQL database server (hostname:port)
  75. PHOTOPRISM_DATABASE_NAME: "photoprism" # MariaDB or MySQL database schema name
  76. PHOTOPRISM_DATABASE_USER: "administrator" # MariaDB or MySQL database user name
  77. PHOTOPRISM_DATABASE_PASSWORD: "password2" # MariaDB or MySQL database user password
  78. PHOTOPRISM_SITE_TITLE: "PhotoPrism"
  79. PHOTOPRISM_SITE_CAPTION: "AI-Powered Photos App"
  80. PHOTOPRISM_SITE_DESCRIPTION: ""
  81. PHOTOPRISM_SITE_AUTHOR: ""
  82. PHOTOPRISM_SPONSOR: "true"
  83. ## Run/install on first startup (options: update, gpu, tensorflow, davfs, nano, clean):
  84. PHOTOPRISM_INIT: "gpu tensorflow"
  85. ## Hardware video transcoding config (optional)
  86. PHOTOPRISM_FFMPEG_BUFFERS: "64" # FFmpeg capture buffers (default: 32)
  87. PHOTOPRISM_FFMPEG_BITRATE: "32" # FFmpeg encoding bitrate limit in Mbit/s (default: 50)
  88. PHOTOPRISM_FFMPEG_ENCODER: "h264_vaapi" # use Video4Linux for AVC transcoding (default: libx264)
  89. # PHOTOPRISM_FFMPEG_ENCODER: "h264_qsv" # use Intel Quick Sync Video for AVC transcoding (default: libx264)
  90. ## Run as a specific user, group, or with a custom umask (does not work together with "user:")
  91. # PHOTOPRISM_UID: 1000
  92. # PHOTOPRISM_GID: 1000
  93. # PHOTOPRISM_UMASK: 0000
  94. HOME: "/photoprism"
  95. ## Start as a non-root user (see https://docs.docker.com/engine/reference/run/#user)
  96. # user: "1000:1000"
  97. ## Share hardware devices with FFmpeg and TensorFlow (optional):
  98. devices:
  99. - "/dev/dri/renderD128:/dev/dri/renderD128" # For the internal GPU in the i5 8500T
  100. # - "/dev/nvidia0:/dev/nvidia0"
  101. # - "/dev/nvidiactl:/dev/nvidiactl"
  102. # - "/dev/video11:/dev/video11" # Video4Linux (h264_v4l2m2m)
  103. working_dir: "/photoprism"
  104. ## Storage Folders: "~" is a shortcut for your home directory, "." for the current directory
  105. volumes:
  106. # "/host/folder:/photoprism/folder" # example
  107. # - "~/Pictures:/photoprism/originals" # original media files (photos and videos)
  108. - "/mnt/NAS/Media/Photos/Phone:/photoprism/originals/Syncek" # My photos from phone
  109. - "/mnt/NAS/Media/Photos/Events:/photoprism/originals/Events" # Life events
  110. # - "/example/family:/photoprism/originals/family" # *additional* media folders can be mounted like this
  111. # - "~/Import:/photoprism/import" # *optional* base folder from which files can be imported to originals
  112. - "/home/docker/docker_photoprism/storage:/photoprism/storage" # *writable* storage folder for cache, database, and sidecar files (never remove)
  113.  
  114. ## Database Server (recommended)
  115. ## see https://docs.photoprism.app/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql
  116. mariadb:
  117. ## If MariaDB gets stuck in a restart loop, this points to a memory or filesystem issue:
  118. ## https://docs.photoprism.app/getting-started/troubleshooting/#fatal-server-errors
  119. restart: unless-stopped
  120. image: mariadb:10.6
  121. security_opt:
  122. - seccomp:unconfined
  123. - apparmor:unconfined
  124. command: mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120
  125. ## Never store database files on an unreliable device such as a USB flash drive, an SD card, or a shared network folder:
  126. volumes:
  127. - "/home/docker/docker_photoprism/database:/var/lib/mysql" # important, don't remove
  128. environment:
  129. MYSQL_ROOT_PASSWORD: password3
  130. MYSQL_DATABASE: photoprism
  131. MYSQL_USER: administrator
  132. MYSQL_PASSWORD: password2
  133.  
  134. ## Watchtower upgrades services automatically (optional)
  135. ## see https://docs.photoprism.app/getting-started/updates/#watchtower
  136. #
  137. # watchtower:
  138. # restart: unless-stopped
  139. # image: containrrr/watchtower
  140. # environment:
  141. # WATCHTOWER_CLEANUP: "true"
  142. # WATCHTOWER_POLL_INTERVAL: 7200 # checks for updates every two hours
  143. # volumes:
  144. # - "/var/run/docker.sock:/var/run/docker.sock"
  145. # - "~/.docker/config.json:/config.json" # optional, for authentication if you have a Docker Hub account
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement