2019-05-06 23:18:10 +02:00
|
|
|
package config
|
2018-09-24 09:53:16 +02:00
|
|
|
|
2019-06-20 01:11:03 +02:00
|
|
|
import (
|
2022-04-12 19:44:43 +02:00
|
|
|
"fmt"
|
|
|
|
|
2021-01-09 12:18:59 +01:00
|
|
|
"github.com/klauspost/cpuid/v2"
|
2019-06-20 01:11:03 +02:00
|
|
|
"github.com/urfave/cli"
|
2021-09-23 13:16:05 +02:00
|
|
|
|
2022-04-12 19:44:43 +02:00
|
|
|
"github.com/photoprism/photoprism/internal/entity"
|
2021-09-23 13:16:05 +02:00
|
|
|
"github.com/photoprism/photoprism/internal/face"
|
2021-12-12 22:09:22 +01:00
|
|
|
"github.com/photoprism/photoprism/internal/i18n"
|
2022-04-01 13:25:25 +02:00
|
|
|
"github.com/photoprism/photoprism/internal/thumb"
|
2019-06-20 01:11:03 +02:00
|
|
|
)
|
2018-09-24 09:53:16 +02:00
|
|
|
|
2021-09-05 12:32:08 +02:00
|
|
|
// GlobalFlags describes global command-line parameters and flags.
|
2018-09-24 09:53:16 +02:00
|
|
|
var GlobalFlags = []cli.Flag{
|
2022-04-12 20:00:06 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "admin-password, pw",
|
|
|
|
Usage: fmt.Sprintf("initial admin `PASSWORD`, must have at least %d characters", entity.PasswordLen),
|
|
|
|
EnvVar: "PHOTOPRISM_ADMIN_PASSWORD",
|
|
|
|
},
|
2021-10-05 22:33:29 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "log-level, l",
|
2022-04-12 20:00:06 +02:00
|
|
|
Usage: "log message verbosity `LEVEL` (trace, debug, info, warning, error, fatal, panic)",
|
2021-10-05 22:33:29 +02:00
|
|
|
Value: "info",
|
|
|
|
EnvVar: "PHOTOPRISM_LOG_LEVEL",
|
|
|
|
},
|
2021-12-02 16:39:19 +01:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "debug",
|
2022-04-12 19:44:43 +02:00
|
|
|
Usage: "enable debug mode, show non-essential log messages",
|
2021-12-02 16:39:19 +01:00
|
|
|
EnvVar: "PHOTOPRISM_DEBUG",
|
|
|
|
},
|
2022-04-12 19:44:43 +02:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "trace",
|
|
|
|
Usage: "enable trace mode, show all log messages",
|
|
|
|
EnvVar: "PHOTOPRISM_TRACE",
|
|
|
|
},
|
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "auth, a",
|
2022-04-13 22:43:49 +02:00
|
|
|
Usage: "always require password authentication, overrides the public flag if it is set",
|
2022-04-12 19:44:43 +02:00
|
|
|
EnvVar: "PHOTOPRISM_AUTH",
|
|
|
|
},
|
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "public, p",
|
|
|
|
Usage: "disable password authentication, WebDAV, and the advanced settings page",
|
|
|
|
EnvVar: "PHOTOPRISM_PUBLIC",
|
|
|
|
},
|
2021-02-06 17:04:00 +01:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "test",
|
|
|
|
Hidden: true,
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "enable test mode",
|
2021-02-06 17:04:00 +01:00
|
|
|
},
|
2021-10-17 14:25:29 +02:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "unsafe",
|
|
|
|
Hidden: true,
|
|
|
|
Usage: "enable unsafe mode",
|
|
|
|
EnvVar: "PHOTOPRISM_UNSAFE",
|
|
|
|
},
|
2020-12-18 10:59:21 +01:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "demo",
|
|
|
|
Hidden: true,
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "enable demo mode",
|
2020-12-18 10:59:21 +01:00
|
|
|
EnvVar: "PHOTOPRISM_DEMO",
|
|
|
|
},
|
2021-01-15 18:30:26 +01:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "sponsor",
|
|
|
|
Hidden: true,
|
2021-01-19 21:28:16 +01:00
|
|
|
Usage: "your continuous support helps to pay for development and operating expenses",
|
2021-01-15 18:30:26 +01:00
|
|
|
EnvVar: "PHOTOPRISM_SPONSOR",
|
|
|
|
},
|
2019-05-04 09:11:33 +02:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "read-only, r",
|
2022-01-10 11:06:48 +01:00
|
|
|
Usage: "disable import, upload, delete, and all other operations that require write permissions",
|
2020-05-29 09:23:26 +02:00
|
|
|
EnvVar: "PHOTOPRISM_READONLY",
|
2019-05-04 09:11:33 +02:00
|
|
|
},
|
2019-12-30 12:38:11 +01:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "experimental, e",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "enable experimental features",
|
2019-12-30 12:38:11 +01:00
|
|
|
EnvVar: "PHOTOPRISM_EXPERIMENTAL",
|
|
|
|
},
|
2022-01-05 18:15:39 +01:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "partner-id",
|
|
|
|
Hidden: true,
|
|
|
|
Usage: "hosting partner id",
|
|
|
|
EnvVar: "PHOTOPRISM_PARTNER_ID",
|
|
|
|
},
|
2020-12-17 18:24:55 +01:00
|
|
|
cli.StringFlag{
|
2022-04-13 22:43:49 +02:00
|
|
|
Name: "config-path, c",
|
|
|
|
Usage: "config storage `PATH`, values in options.yml override CLI flags and environment variables if present",
|
|
|
|
EnvVar: "PHOTOPRISM_CONFIG_PATH",
|
2020-12-17 18:24:55 +01:00
|
|
|
},
|
2020-12-21 15:00:18 +01:00
|
|
|
cli.StringFlag{
|
2022-04-13 22:43:49 +02:00
|
|
|
Name: "defaults-yaml, y",
|
|
|
|
Usage: "load config defaults from `FILE` if exists, does not override CLI flags and environment variables",
|
|
|
|
Value: "/etc/photoprism/defaults.yml",
|
|
|
|
EnvVar: "PHOTOPRISM_DEFAULTS_YAML",
|
2020-12-21 15:00:18 +01:00
|
|
|
},
|
2020-05-31 02:09:52 +02:00
|
|
|
cli.StringFlag{
|
2022-04-02 20:15:23 +02:00
|
|
|
Name: "originals-path, o",
|
2022-01-11 14:34:30 +01:00
|
|
|
Usage: "storage `PATH` of your original media files (photos and videos)",
|
2020-12-18 09:11:42 +01:00
|
|
|
EnvVar: "PHOTOPRISM_ORIGINALS_PATH",
|
2020-05-31 02:09:52 +02:00
|
|
|
},
|
2020-12-18 09:11:42 +01:00
|
|
|
cli.IntFlag{
|
2022-04-02 20:34:29 +02:00
|
|
|
Name: "originals-limit, mb",
|
2020-12-18 09:11:42 +01:00
|
|
|
Value: 1000,
|
2022-04-13 22:43:49 +02:00
|
|
|
Usage: "maximum size of media files in `MB` (1-100000; -1 to disable)",
|
2020-12-18 09:11:42 +01:00
|
|
|
EnvVar: "PHOTOPRISM_ORIGINALS_LIMIT",
|
|
|
|
},
|
2022-04-01 21:14:22 +02:00
|
|
|
cli.IntFlag{
|
2022-04-02 20:34:29 +02:00
|
|
|
Name: "resolution-limit, mp",
|
2022-04-01 21:14:22 +02:00
|
|
|
Value: 100,
|
|
|
|
Usage: "maximum resolution of media files in `MEGAPIXELS` (1-900; -1 to disable)",
|
2022-04-02 18:04:02 +02:00
|
|
|
EnvVar: "PHOTOPRISM_RESOLUTION_LIMIT",
|
2022-04-01 21:14:22 +02:00
|
|
|
},
|
2020-12-18 09:11:42 +01:00
|
|
|
cli.StringFlag{
|
2022-04-07 11:56:44 +02:00
|
|
|
Name: "storage-path, s",
|
|
|
|
Usage: "writable storage `PATH` for sidecar, cache, and database files",
|
2020-12-18 09:11:42 +01:00
|
|
|
EnvVar: "PHOTOPRISM_STORAGE_PATH",
|
|
|
|
},
|
2021-10-11 23:25:49 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "sidecar-path",
|
2022-02-08 14:41:03 +01:00
|
|
|
Usage: "custom relative or absolute sidecar `PATH` (optional)",
|
2021-10-11 23:25:49 +02:00
|
|
|
EnvVar: "PHOTOPRISM_SIDECAR_PATH",
|
|
|
|
},
|
2020-12-18 09:11:42 +01:00
|
|
|
cli.StringFlag{
|
2022-04-07 11:56:44 +02:00
|
|
|
Name: "cache-path",
|
|
|
|
Usage: "custom cache `PATH` for sessions and thumbnail files (optional)",
|
|
|
|
EnvVar: "PHOTOPRISM_CACHE_PATH",
|
2020-12-18 09:11:42 +01:00
|
|
|
},
|
|
|
|
cli.StringFlag{
|
2022-04-02 18:04:02 +02:00
|
|
|
Name: "backup-path",
|
2022-02-08 14:41:03 +01:00
|
|
|
Usage: "custom backup `PATH` for index backup files (optional)",
|
2020-12-18 09:11:42 +01:00
|
|
|
EnvVar: "PHOTOPRISM_BACKUP_PATH",
|
|
|
|
},
|
2022-04-07 11:56:44 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "import-path",
|
|
|
|
Usage: "base `PATH` from which files can be imported to originals (optional)",
|
|
|
|
EnvVar: "PHOTOPRISM_IMPORT_PATH",
|
|
|
|
},
|
2020-12-18 09:11:42 +01:00
|
|
|
cli.StringFlag{
|
2022-04-02 18:04:02 +02:00
|
|
|
Name: "assets-path",
|
2021-10-07 11:43:43 +02:00
|
|
|
Usage: "assets `PATH` containing static resources like icons, models, and translations",
|
2020-12-18 09:11:42 +01:00
|
|
|
EnvVar: "PHOTOPRISM_ASSETS_PATH",
|
2020-12-17 18:24:55 +01:00
|
|
|
},
|
2022-04-07 11:56:44 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "temp-path",
|
|
|
|
Usage: "temporary file `PATH` (optional)",
|
|
|
|
EnvVar: "PHOTOPRISM_TEMP_PATH",
|
|
|
|
},
|
2020-01-06 23:43:19 +01:00
|
|
|
cli.IntFlag{
|
|
|
|
Name: "workers, w",
|
2021-10-07 13:00:32 +02:00
|
|
|
Usage: "maximum `NUMBER` of indexing workers, default depends on the number of physical cores",
|
2020-01-06 23:43:19 +01:00
|
|
|
EnvVar: "PHOTOPRISM_WORKERS",
|
2021-01-09 12:18:59 +01:00
|
|
|
Value: cpuid.CPU.PhysicalCores / 2,
|
2020-01-06 23:43:19 +01:00
|
|
|
},
|
2022-04-03 14:51:58 +02:00
|
|
|
cli.StringFlag{
|
2022-03-28 13:45:29 +02:00
|
|
|
Name: "wakeup-interval, i",
|
2022-04-03 14:51:58 +02:00
|
|
|
Usage: "`DURATION` between worker runs required for face recognition and index maintenance (1-86400s)",
|
|
|
|
Value: DefaultWakeupInterval.String(),
|
2020-04-06 22:09:45 +02:00
|
|
|
EnvVar: "PHOTOPRISM_WAKEUP_INTERVAL",
|
|
|
|
},
|
2021-01-02 18:56:15 +01:00
|
|
|
cli.IntFlag{
|
|
|
|
Name: "auto-index",
|
2022-04-01 21:14:22 +02:00
|
|
|
Usage: "WebDAV auto index safety delay in `SECONDS` (-1 to disable)",
|
2021-10-05 18:42:39 +02:00
|
|
|
Value: DefaultAutoIndexDelay,
|
2021-01-02 18:56:15 +01:00
|
|
|
EnvVar: "PHOTOPRISM_AUTO_INDEX",
|
|
|
|
},
|
|
|
|
cli.IntFlag{
|
|
|
|
Name: "auto-import",
|
2022-04-01 21:14:22 +02:00
|
|
|
Usage: "WebDAV auto import safety delay in `SECONDS` (-1 to disable)",
|
2021-10-05 18:42:39 +02:00
|
|
|
Value: DefaultAutoImportDelay,
|
2021-01-02 18:56:15 +01:00
|
|
|
EnvVar: "PHOTOPRISM_AUTO_IMPORT",
|
|
|
|
},
|
2020-12-18 10:59:21 +01:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "disable-webdav",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "disable built-in WebDAV server",
|
2020-12-18 10:59:21 +01:00
|
|
|
EnvVar: "PHOTOPRISM_DISABLE_WEBDAV",
|
|
|
|
},
|
2020-12-18 09:11:42 +01:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "disable-settings",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "disable settings UI and API",
|
2020-12-18 09:11:42 +01:00
|
|
|
EnvVar: "PHOTOPRISM_DISABLE_SETTINGS",
|
|
|
|
},
|
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "disable-places",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "disable reverse geocoding and maps",
|
2020-12-18 09:11:42 +01:00
|
|
|
EnvVar: "PHOTOPRISM_DISABLE_PLACES",
|
|
|
|
},
|
2021-10-07 13:00:32 +02:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "disable-backups",
|
2022-04-06 17:46:41 +02:00
|
|
|
Usage: "disable backing up albums and photo metadata to YAML files",
|
2021-10-07 13:00:32 +02:00
|
|
|
EnvVar: "PHOTOPRISM_DISABLE_BACKUPS",
|
|
|
|
},
|
2021-09-24 03:00:37 +02:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "disable-tensorflow",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "disable all features depending on TensorFlow",
|
2021-09-24 03:00:37 +02:00
|
|
|
EnvVar: "PHOTOPRISM_DISABLE_TENSORFLOW",
|
|
|
|
},
|
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "disable-faces",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "disable facial recognition",
|
2021-09-24 03:00:37 +02:00
|
|
|
EnvVar: "PHOTOPRISM_DISABLE_FACES",
|
|
|
|
},
|
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "disable-classification",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "disable image classification",
|
2021-09-24 03:00:37 +02:00
|
|
|
EnvVar: "PHOTOPRISM_DISABLE_CLASSIFICATION",
|
|
|
|
},
|
2022-03-28 15:57:29 +02:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "disable-ffmpeg",
|
|
|
|
Usage: "disable video transcoding and thumbnail extraction with FFmpeg",
|
|
|
|
EnvVar: "PHOTOPRISM_DISABLE_FFMPEG",
|
|
|
|
},
|
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "disable-exiftool",
|
|
|
|
Usage: "disable creating JSON metadata sidecar files with ExifTool",
|
|
|
|
EnvVar: "PHOTOPRISM_DISABLE_EXIFTOOL",
|
|
|
|
},
|
|
|
|
cli.BoolFlag{
|
2022-04-06 17:46:41 +02:00
|
|
|
Name: "disable-heifconvert",
|
|
|
|
Usage: "disable conversion of HEIC/HEIF files",
|
|
|
|
EnvVar: "PHOTOPRISM_DISABLE_HEIFCONVERT",
|
|
|
|
},
|
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "disable-darktable",
|
|
|
|
Usage: "disable conversion of RAW files with Darktable",
|
|
|
|
EnvVar: "PHOTOPRISM_DISABLE_DARKTABLE",
|
|
|
|
},
|
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "disable-rawtherapee",
|
|
|
|
Usage: "disable conversion of RAW files with RawTherapee",
|
|
|
|
EnvVar: "PHOTOPRISM_DISABLE_RAWTHERAPEE",
|
|
|
|
},
|
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "disable-sips",
|
|
|
|
Usage: "disable conversion of RAW files with Sips (macOS only)",
|
|
|
|
EnvVar: "PHOTOPRISM_DISABLE_SIPS",
|
|
|
|
},
|
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "disable-raw",
|
|
|
|
Usage: "disable indexing and conversion of RAW files",
|
|
|
|
EnvVar: "PHOTOPRISM_DISABLE_RAW",
|
2022-03-28 15:57:29 +02:00
|
|
|
},
|
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "raw-presets",
|
2022-04-06 17:46:41 +02:00
|
|
|
Usage: "enables applying user presets when converting RAW files (reduces performance)",
|
2022-03-28 15:57:29 +02:00
|
|
|
EnvVar: "PHOTOPRISM_RAW_PRESETS",
|
|
|
|
},
|
2022-04-06 17:46:41 +02:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "exif-bruteforce",
|
|
|
|
Usage: "always perform a brute-force search if no Exif headers were found",
|
|
|
|
EnvVar: "PHOTOPRISM_EXIF_BRUTEFORCE",
|
|
|
|
},
|
2020-12-18 09:11:42 +01:00
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "detect-nsfw",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "flag photos as private that may be offensive (requires TensorFlow)",
|
2020-12-18 09:11:42 +01:00
|
|
|
EnvVar: "PHOTOPRISM_DETECT_NSFW",
|
|
|
|
},
|
|
|
|
cli.BoolFlag{
|
2022-04-07 11:56:44 +02:00
|
|
|
Name: "upload-nsfw, n",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "allow uploads that may be offensive",
|
2020-12-18 09:11:42 +01:00
|
|
|
EnvVar: "PHOTOPRISM_UPLOAD_NSFW",
|
|
|
|
},
|
2021-12-12 22:09:22 +01:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "default-theme",
|
|
|
|
Usage: "standard user interface theme `NAME`",
|
|
|
|
Hidden: true,
|
|
|
|
EnvVar: "PHOTOPRISM_DEFAULT_THEME",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
2022-04-07 11:56:44 +02:00
|
|
|
Name: "default-locale, lang",
|
2021-12-12 22:09:22 +01:00
|
|
|
Usage: "standard user interface language `CODE`",
|
|
|
|
Value: i18n.Default.Locale(),
|
|
|
|
EnvVar: "PHOTOPRISM_DEFAULT_LOCALE",
|
|
|
|
},
|
2021-11-29 14:39:21 +01:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "app-icon",
|
2022-02-08 14:41:03 +01:00
|
|
|
Usage: "web app `ICON` (logo, app, crisp, mint, bold)",
|
2021-11-29 14:39:21 +01:00
|
|
|
EnvVar: "PHOTOPRISM_APP_ICON",
|
|
|
|
},
|
2021-11-25 17:24:53 +01:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "app-name",
|
2022-02-08 14:41:03 +01:00
|
|
|
Usage: "web app `NAME` when installed on a device",
|
2021-11-25 17:24:53 +01:00
|
|
|
Value: "PhotoPrism",
|
|
|
|
EnvVar: "PHOTOPRISM_APP_NAME",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
|
|
|
Name: "app-mode",
|
2022-02-08 14:41:03 +01:00
|
|
|
Usage: "web app `MODE` (fullscreen, standalone, minimal-ui, browser)",
|
2021-11-25 17:24:53 +01:00
|
|
|
Value: "standalone",
|
|
|
|
EnvVar: "PHOTOPRISM_APP_MODE",
|
|
|
|
},
|
2021-07-05 16:41:43 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "cdn-url",
|
2022-02-08 14:41:03 +01:00
|
|
|
Usage: "content delivery network `URL` (optional)",
|
2021-07-05 16:41:43 +02:00
|
|
|
EnvVar: "PHOTOPRISM_CDN_URL",
|
|
|
|
},
|
2019-12-11 14:10:20 +01:00
|
|
|
cli.StringFlag{
|
2022-04-07 11:56:44 +02:00
|
|
|
Name: "site-url, url",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "public site `URL`",
|
2019-12-11 14:10:20 +01:00
|
|
|
Value: "http://localhost:2342/",
|
2020-05-31 02:09:52 +02:00
|
|
|
EnvVar: "PHOTOPRISM_SITE_URL",
|
2019-12-11 14:10:20 +01:00
|
|
|
},
|
2021-10-05 22:33:29 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "site-author",
|
2022-02-08 14:41:03 +01:00
|
|
|
Usage: "site `OWNER`, copyright, or artist",
|
2021-10-05 22:33:29 +02:00
|
|
|
EnvVar: "PHOTOPRISM_SITE_AUTHOR",
|
|
|
|
},
|
2019-12-11 14:10:20 +01:00
|
|
|
cli.StringFlag{
|
2020-05-31 02:09:52 +02:00
|
|
|
Name: "site-title",
|
2021-10-06 08:31:35 +02:00
|
|
|
Usage: "site `TITLE`",
|
2019-12-11 14:10:20 +01:00
|
|
|
Value: "PhotoPrism",
|
2020-05-31 02:09:52 +02:00
|
|
|
EnvVar: "PHOTOPRISM_SITE_TITLE",
|
2019-12-11 14:10:20 +01:00
|
|
|
},
|
|
|
|
cli.StringFlag{
|
2020-05-31 02:09:52 +02:00
|
|
|
Name: "site-caption",
|
2021-10-06 08:31:35 +02:00
|
|
|
Usage: "site `CAPTION`",
|
2022-02-23 14:24:50 +01:00
|
|
|
Value: "AI-Powered Photos App",
|
2020-05-31 02:09:52 +02:00
|
|
|
EnvVar: "PHOTOPRISM_SITE_CAPTION",
|
2019-12-11 14:10:20 +01:00
|
|
|
},
|
|
|
|
cli.StringFlag{
|
2020-05-31 02:09:52 +02:00
|
|
|
Name: "site-description",
|
2022-02-08 14:41:03 +01:00
|
|
|
Usage: "site `DESCRIPTION` (optional)",
|
2020-05-31 02:09:52 +02:00
|
|
|
EnvVar: "PHOTOPRISM_SITE_DESCRIPTION",
|
2019-12-11 14:10:20 +01:00
|
|
|
},
|
2021-10-07 11:43:43 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "site-preview",
|
2022-02-08 14:41:03 +01:00
|
|
|
Usage: "site preview image `URL` (optional)",
|
2021-10-07 11:43:43 +02:00
|
|
|
EnvVar: "PHOTOPRISM_SITE_PREVIEW",
|
|
|
|
},
|
2022-02-08 14:41:03 +01:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "imprint",
|
|
|
|
Usage: "legal `INFO`, displayed in the page footer",
|
|
|
|
Value: "",
|
|
|
|
EnvVar: "PHOTOPRISM_IMPRINT",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
|
|
|
Name: "imprint-url",
|
|
|
|
Usage: "legal info `URL` (optional)",
|
|
|
|
Value: "",
|
|
|
|
EnvVar: "PHOTOPRISM_IMPRINT_URL",
|
|
|
|
},
|
2020-05-31 02:09:52 +02:00
|
|
|
cli.IntFlag{
|
2022-04-07 11:56:44 +02:00
|
|
|
Name: "http-port, port",
|
2020-05-31 02:09:52 +02:00
|
|
|
Value: 2342,
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "http server port `NUMBER`",
|
2020-05-31 02:09:52 +02:00
|
|
|
EnvVar: "PHOTOPRISM_HTTP_PORT",
|
2019-12-11 14:10:20 +01:00
|
|
|
},
|
2019-05-04 13:29:32 +02:00
|
|
|
cli.StringFlag{
|
2022-04-07 11:56:44 +02:00
|
|
|
Name: "http-host, ip",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "http server `IP` address",
|
2020-05-31 02:09:52 +02:00
|
|
|
EnvVar: "PHOTOPRISM_HTTP_HOST",
|
2019-05-04 13:29:32 +02:00
|
|
|
},
|
2019-06-30 05:38:39 +02:00
|
|
|
cli.StringFlag{
|
2022-04-07 11:56:44 +02:00
|
|
|
Name: "http-mode, mode",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "http server `MODE` (debug, release, or test)",
|
2020-05-31 02:09:52 +02:00
|
|
|
EnvVar: "PHOTOPRISM_HTTP_MODE",
|
2019-06-30 05:38:39 +02:00
|
|
|
},
|
2021-01-10 15:28:42 +01:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "http-compression, z",
|
2021-10-07 11:43:43 +02:00
|
|
|
Usage: "http server compression `METHOD` (none or gzip)",
|
2021-01-10 15:28:42 +01:00
|
|
|
EnvVar: "PHOTOPRISM_HTTP_COMPRESSION",
|
|
|
|
},
|
2019-06-30 05:38:39 +02:00
|
|
|
cli.StringFlag{
|
2022-03-30 20:36:25 +02:00
|
|
|
Name: "database-driver, db",
|
2022-02-23 15:59:13 +01:00
|
|
|
Usage: "database `DRIVER` (sqlite, mysql)",
|
2020-05-31 02:09:52 +02:00
|
|
|
Value: "sqlite",
|
|
|
|
EnvVar: "PHOTOPRISM_DATABASE_DRIVER",
|
2019-06-30 05:38:39 +02:00
|
|
|
},
|
2018-09-24 09:53:16 +02:00
|
|
|
cli.StringFlag{
|
2022-03-29 00:21:50 +02:00
|
|
|
Name: "database-dsn, dsn",
|
2022-04-13 22:43:49 +02:00
|
|
|
Usage: "database connection `DSN` (sqlite file, optional for mysql)",
|
2020-05-31 02:09:52 +02:00
|
|
|
EnvVar: "PHOTOPRISM_DATABASE_DSN",
|
|
|
|
},
|
2020-12-11 12:46:28 +01:00
|
|
|
cli.StringFlag{
|
2022-03-30 20:36:25 +02:00
|
|
|
Name: "database-server, db-server",
|
2022-02-23 15:59:13 +01:00
|
|
|
Usage: "database `HOST` incl. port e.g. \"mariadb:3306\" (or socket path)",
|
2020-12-11 12:46:28 +01:00
|
|
|
EnvVar: "PHOTOPRISM_DATABASE_SERVER",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
2022-03-30 20:36:25 +02:00
|
|
|
Name: "database-name, db-name",
|
2020-12-11 12:46:28 +01:00
|
|
|
Value: "photoprism",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "database schema `NAME`",
|
2020-12-11 12:46:28 +01:00
|
|
|
EnvVar: "PHOTOPRISM_DATABASE_NAME",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
2022-03-30 20:36:25 +02:00
|
|
|
Name: "database-user, db-user",
|
2020-12-11 12:46:28 +01:00
|
|
|
Value: "photoprism",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "database user `NAME`",
|
2020-12-11 12:46:28 +01:00
|
|
|
EnvVar: "PHOTOPRISM_DATABASE_USER",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
2022-03-30 20:36:25 +02:00
|
|
|
Name: "database-password, db-pass",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "database user `PASSWORD`",
|
2020-12-11 12:46:28 +01:00
|
|
|
EnvVar: "PHOTOPRISM_DATABASE_PASSWORD",
|
|
|
|
},
|
2020-05-31 02:09:52 +02:00
|
|
|
cli.IntFlag{
|
|
|
|
Name: "database-conns",
|
2021-10-07 11:43:43 +02:00
|
|
|
Usage: "maximum `NUMBER` of open database connections",
|
2020-05-31 02:09:52 +02:00
|
|
|
EnvVar: "PHOTOPRISM_DATABASE_CONNS",
|
|
|
|
},
|
2020-07-13 10:41:45 +02:00
|
|
|
cli.IntFlag{
|
|
|
|
Name: "database-conns-idle",
|
2021-10-07 11:43:43 +02:00
|
|
|
Usage: "maximum `NUMBER` of idle database connections",
|
2020-07-13 10:41:45 +02:00
|
|
|
EnvVar: "PHOTOPRISM_DATABASE_CONNS_IDLE",
|
|
|
|
},
|
2019-06-06 14:44:29 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "darktable-bin",
|
2022-04-02 18:04:02 +02:00
|
|
|
Usage: "Darktable CLI `COMMAND` for RAW to JPEG conversion",
|
2019-06-06 14:44:29 +02:00
|
|
|
Value: "darktable-cli",
|
|
|
|
EnvVar: "PHOTOPRISM_DARKTABLE_BIN",
|
|
|
|
},
|
2021-09-21 15:33:46 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "darktable-blacklist",
|
2022-04-02 18:04:02 +02:00
|
|
|
Usage: "do not use Darktable to convert files with these `EXTENSIONS`",
|
2022-03-23 13:31:23 +01:00
|
|
|
Value: "dng,cr3",
|
2021-09-21 15:33:46 +02:00
|
|
|
EnvVar: "PHOTOPRISM_DARKTABLE_BLACKLIST",
|
|
|
|
},
|
2022-04-06 17:46:41 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "darktable-cache-path",
|
|
|
|
Usage: "custom Darktable cache `PATH` (automatically created if empty)",
|
|
|
|
Value: "",
|
|
|
|
EnvVar: "PHOTOPRISM_DARKTABLE_CACHE_PATH",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
|
|
|
Name: "darktable-config-path",
|
|
|
|
Usage: "custom Darktable config `PATH` (automatically created if empty)",
|
|
|
|
Value: "",
|
|
|
|
EnvVar: "PHOTOPRISM_DARKTABLE_CONFIG_PATH",
|
|
|
|
},
|
2021-05-01 10:25:34 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "rawtherapee-bin",
|
2022-04-02 18:04:02 +02:00
|
|
|
Usage: "RawTherapee CLI `COMMAND` for RAW to JPEG conversion",
|
2021-05-01 10:25:34 +02:00
|
|
|
Value: "rawtherapee-cli",
|
|
|
|
EnvVar: "PHOTOPRISM_RAWTHERAPEE_BIN",
|
2020-07-13 15:23:54 +02:00
|
|
|
},
|
2021-09-21 15:33:46 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "rawtherapee-blacklist",
|
2022-04-02 18:04:02 +02:00
|
|
|
Usage: "do not use RawTherapee to convert files with these `EXTENSIONS`",
|
2021-09-21 15:33:46 +02:00
|
|
|
Value: "",
|
|
|
|
EnvVar: "PHOTOPRISM_RAWTHERAPEE_BLACKLIST",
|
|
|
|
},
|
2020-07-13 15:23:54 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "sips-bin",
|
2022-04-02 18:04:02 +02:00
|
|
|
Usage: "Sips `COMMAND` for RAW to JPEG conversion (macOS only)",
|
2020-07-13 15:23:54 +02:00
|
|
|
Value: "sips",
|
|
|
|
EnvVar: "PHOTOPRISM_SIPS_BIN",
|
2020-07-12 16:36:39 +02:00
|
|
|
},
|
2020-05-11 18:29:17 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "heifconvert-bin",
|
2022-04-06 17:46:41 +02:00
|
|
|
Usage: "HEIC/HEIF image conversion `COMMAND`",
|
2020-05-11 18:29:17 +02:00
|
|
|
Value: "heif-convert",
|
|
|
|
EnvVar: "PHOTOPRISM_HEIFCONVERT_BIN",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
2020-05-13 15:36:42 +02:00
|
|
|
Name: "ffmpeg-bin",
|
2021-10-17 14:25:29 +02:00
|
|
|
Usage: "FFmpeg `COMMAND` for video transcoding and thumbnail extraction",
|
2020-05-13 15:36:42 +02:00
|
|
|
Value: "ffmpeg",
|
2020-05-11 18:29:17 +02:00
|
|
|
EnvVar: "PHOTOPRISM_FFMPEG_BIN",
|
|
|
|
},
|
2021-02-11 20:22:00 +01:00
|
|
|
cli.StringFlag{
|
2022-04-07 11:56:44 +02:00
|
|
|
Name: "ffmpeg-encoder, vc",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "FFmpeg AVC encoder `NAME`",
|
2021-02-11 20:22:00 +01:00
|
|
|
Value: "libx264",
|
2021-02-16 11:40:40 +01:00
|
|
|
EnvVar: "PHOTOPRISM_FFMPEG_ENCODER",
|
2021-02-11 20:22:00 +01:00
|
|
|
},
|
2021-02-17 18:19:52 +01:00
|
|
|
cli.IntFlag{
|
2022-04-07 11:56:44 +02:00
|
|
|
Name: "ffmpeg-bitrate, vb",
|
2021-10-07 11:43:43 +02:00
|
|
|
Usage: "maximum FFmpeg encoding `BITRATE` (Mbit/s)",
|
2021-02-17 18:19:52 +01:00
|
|
|
Value: 50,
|
|
|
|
EnvVar: "PHOTOPRISM_FFMPEG_BITRATE",
|
|
|
|
},
|
2019-06-06 14:44:29 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "exiftool-bin",
|
2021-10-05 22:33:29 +02:00
|
|
|
Usage: "ExifTool `COMMAND` for extracting metadata",
|
2019-06-06 14:44:29 +02:00
|
|
|
Value: "exiftool",
|
|
|
|
EnvVar: "PHOTOPRISM_EXIFTOOL_BIN",
|
|
|
|
},
|
2020-05-27 19:38:40 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "download-token",
|
2022-02-08 14:41:03 +01:00
|
|
|
Usage: "`SECRET` download URL token for originals (default: random)",
|
2020-05-27 19:38:40 +02:00
|
|
|
EnvVar: "PHOTOPRISM_DOWNLOAD_TOKEN",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
2020-05-27 19:56:56 +02:00
|
|
|
Name: "preview-token",
|
2022-02-08 14:41:03 +01:00
|
|
|
Usage: "`SECRET` thumbnail and video streaming URL token (default: random)",
|
2020-05-27 19:56:56 +02:00
|
|
|
EnvVar: "PHOTOPRISM_PREVIEW_TOKEN",
|
2020-05-27 19:38:40 +02:00
|
|
|
},
|
2022-04-01 21:14:22 +02:00
|
|
|
cli.StringFlag{
|
2022-04-06 18:41:15 +02:00
|
|
|
Name: "thumb-color",
|
|
|
|
Usage: "standard color `PROFILE` for thumbnails (leave blank to disable)",
|
2022-04-01 21:14:22 +02:00
|
|
|
Value: "sRGB",
|
2022-04-06 18:41:15 +02:00
|
|
|
EnvVar: "PHOTOPRISM_THUMB_COLOR",
|
2022-04-01 21:14:22 +02:00
|
|
|
},
|
2022-04-07 11:56:44 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "thumb-filter, filter",
|
|
|
|
Usage: "image downscaling filter `NAME` (best to worst: blackman, lanczos, cubic, linear)",
|
|
|
|
Value: "lanczos",
|
|
|
|
EnvVar: "PHOTOPRISM_THUMB_FILTER",
|
|
|
|
},
|
2020-05-05 17:04:13 +02:00
|
|
|
cli.IntFlag{
|
2022-04-09 14:38:56 +02:00
|
|
|
Name: "thumb-size",
|
2022-04-01 13:25:25 +02:00
|
|
|
Usage: "maximum size of thumbnails created during indexing in `PIXELS` (720-7680)",
|
2020-05-05 17:04:13 +02:00
|
|
|
Value: 2048,
|
|
|
|
EnvVar: "PHOTOPRISM_THUMB_SIZE",
|
|
|
|
},
|
|
|
|
cli.IntFlag{
|
2022-04-09 14:38:56 +02:00
|
|
|
Name: "thumb-size-uncached",
|
2022-04-01 13:25:25 +02:00
|
|
|
Usage: "maximum size of missing thumbnails created on demand in `PIXELS` (720-7680)",
|
2020-07-15 08:30:28 +02:00
|
|
|
Value: 7680,
|
2020-07-13 15:23:54 +02:00
|
|
|
EnvVar: "PHOTOPRISM_THUMB_SIZE_UNCACHED",
|
|
|
|
},
|
2022-04-08 14:45:03 +02:00
|
|
|
cli.BoolFlag{
|
2022-04-09 14:38:56 +02:00
|
|
|
Name: "thumb-uncached, u",
|
2022-04-08 14:45:03 +02:00
|
|
|
Usage: "enable on-demand creation of missing thumbnails (high memory and cpu usage)",
|
|
|
|
EnvVar: "PHOTOPRISM_THUMB_UNCACHED",
|
2020-01-13 11:07:09 +01:00
|
|
|
},
|
2022-04-01 13:25:25 +02:00
|
|
|
cli.StringFlag{
|
2022-04-08 14:45:03 +02:00
|
|
|
Name: "jpeg-quality, q",
|
2022-04-01 13:25:25 +02:00
|
|
|
Usage: "`QUALITY` of created JPEG sidecars and thumbnails (25-100, best, high, default, low, worst)",
|
|
|
|
Value: thumb.JpegQuality.String(),
|
2020-05-19 11:00:17 +02:00
|
|
|
EnvVar: "PHOTOPRISM_JPEG_QUALITY",
|
|
|
|
},
|
2022-04-08 14:45:03 +02:00
|
|
|
cli.IntFlag{
|
|
|
|
Name: "jpeg-size",
|
|
|
|
Usage: "maximum size of created JPEG sidecar files in `PIXELS` (720-30000)",
|
|
|
|
Value: 7680,
|
|
|
|
EnvVar: "PHOTOPRISM_JPEG_SIZE",
|
|
|
|
},
|
2021-09-23 13:47:18 +02:00
|
|
|
cli.IntFlag{
|
|
|
|
Name: "face-size",
|
2022-04-08 14:45:03 +02:00
|
|
|
Usage: "minimum size of faces in `PIXELS` (20-10000)",
|
2021-10-05 10:12:48 +02:00
|
|
|
Value: face.SizeThreshold,
|
2021-09-23 13:47:18 +02:00
|
|
|
EnvVar: "PHOTOPRISM_FACE_SIZE",
|
|
|
|
},
|
2021-09-23 13:16:05 +02:00
|
|
|
cli.Float64Flag{
|
|
|
|
Name: "face-score",
|
2022-02-23 13:26:53 +01:00
|
|
|
Usage: "minimum face `QUALITY` score (1-100)",
|
2021-09-23 13:16:05 +02:00
|
|
|
Value: face.ScoreThreshold,
|
|
|
|
EnvVar: "PHOTOPRISM_FACE_SCORE",
|
|
|
|
},
|
|
|
|
cli.IntFlag{
|
|
|
|
Name: "face-overlap",
|
2022-02-23 13:26:53 +01:00
|
|
|
Usage: "face area overlap threshold in `PERCENT` (1-100)",
|
2021-09-23 13:16:05 +02:00
|
|
|
Value: face.OverlapThreshold,
|
|
|
|
EnvVar: "PHOTOPRISM_FACE_OVERLAP",
|
|
|
|
},
|
2021-10-05 10:12:48 +02:00
|
|
|
cli.IntFlag{
|
|
|
|
Name: "face-cluster-size",
|
2022-02-23 13:26:53 +01:00
|
|
|
Usage: "minimum size of automatically clustered faces in `PIXELS` (20-10000)",
|
2021-10-05 10:12:48 +02:00
|
|
|
Value: face.ClusterSizeThreshold,
|
|
|
|
EnvVar: "PHOTOPRISM_FACE_CLUSTER_SIZE",
|
|
|
|
},
|
|
|
|
cli.IntFlag{
|
|
|
|
Name: "face-cluster-score",
|
2022-02-23 13:26:53 +01:00
|
|
|
Usage: "minimum `QUALITY` score of automatically clustered faces (1-100)",
|
2021-10-05 10:12:48 +02:00
|
|
|
Value: face.ClusterScoreThreshold,
|
|
|
|
EnvVar: "PHOTOPRISM_FACE_CLUSTER_SCORE",
|
|
|
|
},
|
2021-09-23 13:16:05 +02:00
|
|
|
cli.IntFlag{
|
|
|
|
Name: "face-cluster-core",
|
2022-02-23 13:26:53 +01:00
|
|
|
Usage: "`NUMBER` of faces forming a cluster core (1-100)",
|
2021-09-23 13:16:05 +02:00
|
|
|
Value: face.ClusterCore,
|
|
|
|
EnvVar: "PHOTOPRISM_FACE_CLUSTER_CORE",
|
|
|
|
},
|
|
|
|
cli.Float64Flag{
|
|
|
|
Name: "face-cluster-dist",
|
2022-02-23 13:26:53 +01:00
|
|
|
Usage: "similarity `DISTANCE` of faces forming a cluster core (0.1-1.5)",
|
2021-09-23 13:16:05 +02:00
|
|
|
Value: face.ClusterDist,
|
|
|
|
EnvVar: "PHOTOPRISM_FACE_CLUSTER_DIST",
|
|
|
|
},
|
|
|
|
cli.Float64Flag{
|
|
|
|
Name: "face-match-dist",
|
2022-02-23 13:26:53 +01:00
|
|
|
Usage: "similarity `OFFSET` for matching faces with existing clusters (0.1-1.5)",
|
2021-09-23 13:16:05 +02:00
|
|
|
Value: face.MatchDist,
|
|
|
|
EnvVar: "PHOTOPRISM_FACE_MATCH_DIST",
|
|
|
|
},
|
2021-12-02 13:21:55 +01:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "pid-filename",
|
2022-04-13 22:43:49 +02:00
|
|
|
Usage: "process id `FILE`, used only in daemon mode",
|
2021-12-02 13:21:55 +01:00
|
|
|
EnvVar: "PHOTOPRISM_PID_FILENAME",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
|
|
|
Name: "log-filename",
|
2022-04-13 22:43:49 +02:00
|
|
|
Usage: "server log `FILE`, used only in daemon mode",
|
2021-12-02 13:21:55 +01:00
|
|
|
EnvVar: "PHOTOPRISM_LOG_FILENAME",
|
|
|
|
Value: "",
|
|
|
|
},
|
2018-09-24 09:53:16 +02:00
|
|
|
}
|