Config: Improve CLI help and docker-compose.yml examples

This commit is contained in:
Michael Mayer 2022-01-11 14:34:30 +01:00
parent a1f8f25395
commit 6453d30906
13 changed files with 85 additions and 98 deletions

View file

@ -54,8 +54,9 @@ a standard 64-bit Linux distribution to run modern server applications, for exam
- apparmor:unconfined
```
- If you install PhotoPrism on a public server outside your home network, please always run it behind a secure
HTTPS reverse proxy such as Traefik, Caddy, or NGINX. Your files and passwords will otherwise be transmitted in
clear text and can be intercepted by anyone, including your provider, hackers, and governments.
HTTPS reverse proxy such as Traefik or Caddy. Your files and passwords will otherwise be transmitted in
clear text and can be intercepted by anyone, including your provider, hackers, and governments:
https://docs.photoprism.app/getting-started/proxies/traefik/
!!! Note
Indexing large photo and video collections significantly benefits from local SSD storage and plenty of memory

View file

@ -13,8 +13,9 @@ version: '3.5'
# - If you see Docker errors related to "cgroups", it may help to add the following to /boot/firmware/cmdline.txt:
# cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1
# - If you install PhotoPrism on a public server outside your home network, please always run it behind a secure
# HTTPS reverse proxy such as Traefik, Caddy, or NGINX. Your files and passwords will otherwise be transmitted
# in clear text and can be intercepted by anyone, including your provider, hackers, and governments.
# HTTPS reverse proxy such as Traefik or Caddy. Your files and passwords will otherwise be transmitted
# in clear text and can be intercepted by anyone, including your provider, hackers, and governments:
# https://docs.photoprism.app/getting-started/proxies/traefik/
#
# Documentation : https://docs.photoprism.app/getting-started/raspberry-pi/
# Docker Hub URL: https://hub.docker.com/r/photoprism/photoprism/
@ -101,16 +102,13 @@ services:
# devices:
# - "/dev/video11:/dev/video11" # Video4Linux (h264_v4l2m2m)
working_dir: "/photoprism"
## Storage Folders: "~" is a placeholder for the home directory of the current user, "." for the current directory
volumes:
## The *originals* folder contains your original photo and video files (- "[host folder]:/photoprism/originals"):
- "~/Pictures:/photoprism/originals"
## Multiple folders can be made accessible by mounting them as subfolders of /photoprism/originals:
# - "/mnt/Family:/photoprism/originals/Family" # [folder 1]:/photoprism/originals/[folder 1]
# - "/mnt/Friends:/photoprism/originals/Friends" # [folder 2]:/photoprism/originals/[folder 2]
## You may mount an *import* folder from which files can be transferred to *originals* (optional):
# - "~/Import:/photoprism/import"
## Cache, session, thumbnail, and sidecar files will be created in the *storage* folder (never remove):
- "./storage:/photoprism/storage"
# "/host/folder:/photoprism/folder" # example
- "~/Pictures:/photoprism/originals" # original media files (photos and videos)
# - "/example/family:/photoprism/originals/family" # *additional* media folders can be mounted like this
# - "~/Import:/photoprism/import" # *optional* base folder from which files can be imported to originals
- "./storage:/photoprism/storage" # *writable* storage folder for cache, database, and sidecar files (never remove)
## Database Server (recommended)
## see https://docs.photoprism.app/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql

View file

@ -31,8 +31,9 @@ servers apply:
- apparmor:unconfined
```
- If you install PhotoPrism on a public server outside your home network, please always run it behind a secure
HTTPS reverse proxy such as Traefik, Caddy, or NGINX. Your files and passwords will otherwise be transmitted in
clear text and can be intercepted by anyone, including your provider, hackers, and governments.
HTTPS reverse proxy such as Traefik or Caddy. Your files and passwords will otherwise be transmitted in
clear text and can be intercepted by anyone, including your provider, hackers, and governments:
https://docs.photoprism.app/getting-started/proxies/traefik/
!!! Note
Indexing large photo and video collections significantly benefits from fast, local SSD storage,

View file

@ -9,8 +9,9 @@ version: '3.5'
# - If you see Docker errors related to "cgroups", it may help to add the following to /boot/firmware/cmdline.txt:
# cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1
# - If you install PhotoPrism on a public server outside your home network, please always run it behind a secure
# HTTPS reverse proxy such as Traefik, Caddy, or NGINX. Your files and passwords will otherwise be transmitted
# in clear text and can be intercepted by anyone, including your provider, hackers, and governments.
# HTTPS reverse proxy such as Traefik or Caddy. Your files and passwords will otherwise be transmitted
# in clear text and can be intercepted by anyone, including your provider, hackers, and governments:
# https://docs.photoprism.app/getting-started/proxies/traefik/
#
# Documentation : https://docs.photoprism.app/getting-started/raspberry-pi/
# Docker Hub URL: https://hub.docker.com/r/photoprism/photoprism/
@ -95,16 +96,13 @@ services:
# devices:
# - "/dev/video11:/dev/video11" # Video4Linux (h264_v4l2m2m)
working_dir: "/photoprism"
## Storage Folders: "~" is a placeholder for the home directory of the current user, "." for the current directory
volumes:
## The *originals* folder contains your original photo and video files (- "[host folder]:/photoprism/originals"):
- "~/Pictures:/photoprism/originals"
## Multiple folders can be made accessible by mounting them as subfolders of /photoprism/originals:
# - "/mnt/Family:/photoprism/originals/Family" # [folder 1]:/photoprism/originals/[folder 1]
# - "/mnt/Friends:/photoprism/originals/Friends" # [folder 2]:/photoprism/originals/[folder 2]
## You may mount an *import* folder from which files can be transferred to *originals* (optional):
# - "~/Import:/photoprism/import"
## Cache, session, thumbnail, and sidecar files will be created in the *storage* folder (never remove):
- "./storage:/photoprism/storage"
# "/host/folder:/photoprism/folder" # example
- "~/Pictures:/photoprism/originals" # original media files (photos and videos)
# - "/example/family:/photoprism/originals/family" # *additional* media folders can be mounted like this
# - "~/Import:/photoprism/import" # *optional* base folder from which files can be imported to originals
- "./storage:/photoprism/storage" # *writable* storage folder for cache, database, and sidecar files (never remove)
## Database Server (recommended)
## see https://docs.photoprism.app/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql

View file

@ -158,20 +158,19 @@ services:
PHOTOPRISM_INIT: "tensorflow-amd64-avx2"
HOME: "/photoprism"
working_dir: "/photoprism"
## Storage Folders: "~" is a placeholder for the home directory of the current user, "." for the current directory
volumes:
## The *originals* folder contains your original photo and video files (- "[host folder]:/photoprism/originals"):
- "./originals:/photoprism/originals"
## You may mount an *import* folder from which files can be transferred to *originals* (optional):
- "./import:/photoprism/import"
## Cache, session, thumbnail, and sidecar files will be created in the *storage* folder (never remove):
- "./storage:/photoprism/storage"
- "./backup:/var/lib/photoprism"
# "/host/folder:/photoprism/folder" # example:
- "./originals:/photoprism/originals" # original media files (photos and videos)
- "./import:/photoprism/import" # *optional* base folder from which files can be imported to originals
- "./storage:/photoprism/storage" # *writable* storage folder for cache, database, and sidecar files (never remove)
- "./backup:/var/lib/photoprism" # *optional* storage folder for database backups
## Traefik Reverse Proxy (required)
## see https://docs.photoprism.app/getting-started/proxies/traefik/
traefik:
restart: always
image: traefik:v2.4
image: traefik:v2.5
container_name: traefik
ports:
- "80:80"

View file

@ -6,8 +6,9 @@ version: '3.5'
# - Running PhotoPrism on a server with less than 4 GB of swap space or setting a memory/swap limit can cause unexpected
# restarts ("crashes"), especially when the indexer temporarily needs more memory to process large files.
# - If you install PhotoPrism on a public server outside your home network, please always run it behind a secure
# HTTPS reverse proxy such as Traefik, Caddy, or NGINX. Your files and passwords will otherwise be transmitted
# in clear text and can be intercepted by anyone, including your provider, hackers, and governments.
# HTTPS reverse proxy such as Traefik or Caddy. Your files and passwords will otherwise be transmitted
# in clear text and can be intercepted by anyone, including your provider, hackers, and governments:
# https://docs.photoprism.app/getting-started/proxies/traefik/
#
# Documentation : https://docs.photoprism.app/getting-started/docker-compose/
# Docker Hub URL: https://hub.docker.com/r/photoprism/photoprism/
@ -100,16 +101,13 @@ services:
# - "/dev/dri/renderD128:/dev/dri/renderD128" # Intel GPU
# - "/dev/dri/card0:/dev/dri/card0"
working_dir: "/photoprism"
## Storage Folders: "~" is a placeholder for the home directory of the current user, "." for the current directory
volumes:
## The *originals* folder contains your original photo and video files (- "[host folder]:/photoprism/originals"):
- "~/Pictures:/photoprism/originals"
## Multiple folders can be made accessible by mounting them as subfolders of /photoprism/originals:
# - "/mnt/Family:/photoprism/originals/Family" # [folder 1]:/photoprism/originals/[folder 1]
# - "/mnt/Friends:/photoprism/originals/Friends" # [folder 2]:/photoprism/originals/[folder 2]
## You may mount an *import* folder from which files can be transferred to *originals* (optional):
# - "~/Import:/photoprism/import"
## Cache, session, thumbnail, and sidecar files will be created in the *storage* folder (never remove):
- "./storage:/photoprism/storage"
# "/host/folder:/photoprism/folder" # example
- "~/Pictures:/photoprism/originals" # original media files (photos and videos)
# - "/example/family:/photoprism/originals/family" # *additional* media folders can be mounted like this
# - "~/Import:/photoprism/import" # *optional* base folder from which files can be imported to originals
- "./storage:/photoprism/storage" # *writable* storage folder for cache, database, and sidecar files (never remove)
## Database Server (recommended)
## see https://docs.photoprism.app/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql

View file

@ -6,8 +6,9 @@ version: '3.5'
# - Running PhotoPrism on a server with less than 4 GB of swap space or setting a memory/swap limit can cause unexpected
# restarts ("crashes"), especially when the indexer temporarily needs more memory to process large files.
# - If you install PhotoPrism on a public server outside your home network, please always run it behind a secure
# HTTPS reverse proxy such as Traefik, Caddy, or NGINX. Your files and passwords will otherwise be transmitted
# in clear text and can be intercepted by anyone, including your provider, hackers, and governments.
# HTTPS reverse proxy such as Traefik or Caddy. Your files and passwords will otherwise be transmitted
# in clear text and can be intercepted by anyone, including your provider, hackers, and governments:
# https://docs.photoprism.app/getting-started/proxies/traefik/
#
# Documentation : https://docs.photoprism.app/getting-started/docker-compose/
# Docker Hub URL: https://hub.docker.com/r/photoprism/photoprism/
@ -78,16 +79,13 @@ services:
## Enable TensorFlow AVX2 support for modern Intel CPUs (requires starting the container as root):
# PHOTOPRISM_INIT: "tensorflow-amd64-avx2"
HOME: "/photoprism"
## Storage Folders: "~" is a placeholder for the home directory of the current user, "." for the current directory
volumes:
## The *originals* folder contains your original photo and video files (- "[host folder]:/photoprism/originals"):
- "~/Pictures:/photoprism/originals"
## Multiple folders can be made accessible by mounting them as subfolders of /photoprism/originals:
# - "/mnt/Family:/photoprism/originals/Family" # [folder 1]:/photoprism/originals/[folder 1]
# - "/mnt/Friends:/photoprism/originals/Friends" # [folder 2]:/photoprism/originals/[folder 2]
## You may mount an *import* folder from which files can be transferred to *originals* (optional):
# - "~/Import:/photoprism/import"
## Cache, session, thumbnail, and sidecar files will be created in the *storage* folder (never remove):
- "./storage:/photoprism/storage"
# "/host/folder:/photoprism/folder" # example
- "~/Pictures:/photoprism/originals" # original media files (photos and videos)
# - "/example/family:/photoprism/originals/family" # *additional* media folders can be mounted like this
# - "~/Import:/photoprism/import" # *optional* base folder from which files can be imported to originals
- "./storage:/photoprism/storage" # *writable* storage folder for cache, database, and sidecar files (never remove)
## Database Server (recommended)
## see https://docs.photoprism.app/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql

View file

@ -7,8 +7,9 @@ version: '3.5'
# - Running PhotoPrism on a server with less than 4 GB of swap space or setting a memory/swap limit can cause unexpected
# restarts ("crashes"), especially when the indexer temporarily needs more memory to process large files.
# - If you install PhotoPrism on a public server outside your home network, please always run it behind a secure
# HTTPS reverse proxy such as Traefik, Caddy, or NGINX. Your files and passwords will otherwise be transmitted
# in clear text and can be intercepted by anyone, including your provider, hackers, and governments.
# HTTPS reverse proxy such as Traefik or Caddy. Your files and passwords will otherwise be transmitted
# in clear text and can be intercepted by anyone, including your provider, hackers, and governments:
# https://docs.photoprism.app/getting-started/proxies/traefik/
#
# Documentation : https://docs.photoprism.app/getting-started/docker-compose/
# Docker Hub URL: https://hub.docker.com/r/photoprism/photoprism/
@ -91,16 +92,13 @@ services:
# PHOTOPRISM_INIT: "tensorflow-amd64-avx2"
HOME: "/photoprism"
working_dir: "/photoprism"
## Storage Folders: "~" is a placeholder for the home directory of the current user, "." for the current directory
volumes:
## The *originals* folder contains your original photo and video files (- "[host folder]:/photoprism/originals"):
- "~/Pictures:/photoprism/originals"
## Multiple folders can be made accessible by mounting them as subfolders of /photoprism/originals:
# - "/mnt/Family:/photoprism/originals/Family" # [folder 1]:/photoprism/originals/[folder 1]
# - "/mnt/Friends:/photoprism/originals/Friends" # [folder 2]:/photoprism/originals/[folder 2]
## You may mount an *import* folder from which files can be transferred to *originals* (optional):
# - "~/Import:/photoprism/import"
## Cache, session, thumbnail, and sidecar files will be created in the *storage* folder (never remove):
- "./storage:/photoprism/storage"
# "/host/folder:/photoprism/folder" # example
- "~/Pictures:/photoprism/originals" # original media files (photos and videos)
# - "/example/family:/photoprism/originals/family" # *additional* media folders can be mounted like this
# - "~/Import:/photoprism/import" # *optional* base folder from which files can be imported to originals
- "./storage:/photoprism/storage" # *writable* storage folder for cache, database, and sidecar files (never remove)
## Database Server (recommended)
## see https://docs.photoprism.app/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql

View file

@ -8,8 +8,9 @@ version: '3.5'
# - Running PhotoPrism on a server with less than 4 GB of swap space or setting a memory/swap limit can cause unexpected
# restarts ("crashes"), especially when the indexer temporarily needs more memory to process large files.
# - If you install PhotoPrism on a public server outside your home network, please always run it behind a secure
# HTTPS reverse proxy such as Traefik, Caddy, or NGINX. Your files and passwords will otherwise be transmitted
# in clear text and can be intercepted by anyone, including your provider, hackers, and governments.
# HTTPS reverse proxy such as Traefik or Caddy. Your files and passwords will otherwise be transmitted
# in clear text and can be intercepted by anyone, including your provider, hackers, and governments:
# https://docs.photoprism.app/getting-started/proxies/traefik/
#
# Documentation : https://docs.photoprism.app/getting-started/docker-compose/
# Docker Hub URL: https://hub.docker.com/r/photoprism/photoprism/
@ -84,16 +85,13 @@ services:
# PHOTOPRISM_INIT: "tensorflow-amd64-avx2"
HOME: "/photoprism"
working_dir: "/photoprism"
## Storage Folders: "~" is a placeholder for the home directory of the current user, "." for the current directory
volumes:
## The *originals* folder contains your original photo and video files (- "[host folder]:/photoprism/originals"):
- "~/Pictures:/photoprism/originals"
## Multiple folders can be made accessible by mounting them as subfolders of /photoprism/originals:
# - "/mnt/Family:/photoprism/originals/Family" # [folder 1]:/photoprism/originals/[folder 1]
# - "/mnt/Friends:/photoprism/originals/Friends" # [folder 2]:/photoprism/originals/[folder 2]
## You may mount an *import* folder from which files can be transferred to *originals* (optional):
# - "~/Import:/photoprism/import"
## Cache, session, thumbnail, and sidecar files will be created in the *storage* folder (never remove):
- "./storage:/photoprism/storage"
# "/host/folder:/photoprism/folder" # example
- "~/Pictures:/photoprism/originals" # original media files (photos and videos)
# - "/example/family:/photoprism/originals/family" # *additional* media folders can be mounted like this
# - "~/Import:/photoprism/import" # *optional* base folder from which files can be imported to originals
- "./storage:/photoprism/storage" # *writable* storage folder for cache, database, and sidecar files (never remove)
## Watchtower upgrades services automatically (optional)
## see https://docs.photoprism.app/getting-started/updates/#watchtower

View file

@ -11,8 +11,9 @@ version: '3.5'
# It's important to explicitly increase the Docker memory limit to 4 GB or more when using Hyper-V.
# The default of 2 GB may reduce indexing performance and cause unexpected restarts.
# - If you install PhotoPrism on a public server outside your home network, please always run it behind a secure
# HTTPS reverse proxy such as Traefik, Caddy, or NGINX. Your files and passwords will otherwise be transmitted
# in clear text and can be intercepted by anyone, including your provider, hackers, and governments.
# HTTPS reverse proxy such as Traefik or Caddy. Your files and passwords will otherwise be transmitted
# in clear text and can be intercepted by anyone, including your provider, hackers, and governments:
# https://docs.photoprism.app/getting-started/proxies/traefik/
#
# Documentation : https://docs.photoprism.app/getting-started/docker-compose/
# Docker Hub URL: https://hub.docker.com/r/photoprism/photoprism/
@ -82,16 +83,13 @@ services:
PHOTOPRISM_SITE_AUTHOR: ""
HOME: "/photoprism"
working_dir: "/photoprism"
## Storage Folders: use "/" not "\" as separator, "~" is a placeholder for C:/user/{username}, "." for the current directory
volumes:
## The *originals* folder contains your original photo and video files (- "C:/Directory:/photoprism/originals"):
- "~/Pictures:/photoprism/originals/Pictures"
## Multiple folders can be made accessible by mounting them as subfolders of /photoprism/originals:
# - "D:/Pictures:/photoprism/originals/Pictures"
# - "E:/Friends:/photoprism/originals/Friends"
## You may mount an *import* folder from which files can be transferred to *originals* (optional):
# - "E:/:/photoprism/import"
## Cache, session, thumbnail, and sidecar files will be created in the *storage* folder (never remove):
- "./storage:/photoprism/storage"
# "C:/user/username/folder:/photoprism/folder" # example
- "~/Pictures:/photoprism/originals" # original media files (photos and videos)
# - "D:/example/family:/photoprism/originals/family" # *additional* media folders can be mounted like this
# - "E:/:/photoprism/import" # *optional* base folder from which files can be imported to originals
- "./storage:/photoprism/storage" # *writable* storage folder for cache, database, and sidecar files (never remove)
## Database Server (recommended)
## see https://docs.photoprism.app/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql

View file

@ -42,8 +42,8 @@ func configAction(ctx *cli.Context) error {
// Paths.
fmt.Printf("%-25s %s\n", "originals-path", conf.OriginalsPath())
fmt.Printf("%-25s %d\n", "originals-limit", conf.OriginalsLimit())
fmt.Printf("%-25s %s\n", "import-path", conf.ImportPath())
fmt.Printf("%-25s %s\n", "storage-path", conf.StoragePath())
fmt.Printf("%-25s %s\n", "import-path", conf.ImportPath())
fmt.Printf("%-25s %s\n", "cache-path", conf.CachePath())
fmt.Printf("%-25s %s\n", "sidecar-path", conf.SidecarPath())
fmt.Printf("%-25s %s\n", "albums-path", conf.AlbumsPath())

View file

@ -82,25 +82,25 @@ var GlobalFlags = []cli.Flag{
},
cli.StringFlag{
Name: "originals-path",
Usage: "original media library `PATH` containing your photo and video collection",
Usage: "storage `PATH` of your original media files (photos and videos)",
EnvVar: "PHOTOPRISM_ORIGINALS_PATH",
},
cli.IntFlag{
Name: "originals-limit",
Value: 1000,
Usage: "original media file size limit in `MB`",
Usage: "file size limit in `MB`",
EnvVar: "PHOTOPRISM_ORIGINALS_LIMIT",
},
cli.StringFlag{
Name: "import-path",
Usage: "optional import `PATH` from which files can be added to originals",
EnvVar: "PHOTOPRISM_IMPORT_PATH",
},
cli.StringFlag{
Name: "storage-path",
Usage: "writable storage `PATH` for cache, database, and sidecar files",
EnvVar: "PHOTOPRISM_STORAGE_PATH",
},
cli.StringFlag{
Name: "import-path",
Usage: "optional base `PATH` from which files can be imported to originals",
EnvVar: "PHOTOPRISM_IMPORT_PATH",
},
cli.StringFlag{
Name: "cache-path",
Usage: "optional custom cache `PATH` for sessions and thumbnail files",

View file

@ -50,8 +50,8 @@ type Options struct {
ConfigFile string `json:"-"`
OriginalsPath string `yaml:"OriginalsPath" json:"-" flag:"originals-path"`
OriginalsLimit int64 `yaml:"OriginalsLimit" json:"OriginalsLimit" flag:"originals-limit"`
ImportPath string `yaml:"ImportPath" json:"-" flag:"import-path"`
StoragePath string `yaml:"StoragePath" json:"-" flag:"storage-path"`
ImportPath string `yaml:"ImportPath" json:"-" flag:"import-path"`
CachePath string `yaml:"CachePath" json:"-" flag:"cache-path"`
SidecarPath string `yaml:"SidecarPath" json:"-" flag:"sidecar-path"`
TempPath string `yaml:"TempPath" json:"-" flag:"temp-path"`