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-11-22 22:14:34 +01: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-11-22 22:14:34 +01:00
|
|
|
|
"github.com/photoprism/photoprism/internal/entity"
|
2021-09-23 13:16:05 +02:00
|
|
|
|
"github.com/photoprism/photoprism/internal/face"
|
2023-03-15 17:05:05 +01:00
|
|
|
|
"github.com/photoprism/photoprism/internal/ffmpeg"
|
2021-12-12 22:09:22 +01:00
|
|
|
|
"github.com/photoprism/photoprism/internal/i18n"
|
2022-10-11 22:44:11 +02:00
|
|
|
|
"github.com/photoprism/photoprism/internal/server/header"
|
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
|
|
|
|
|
2022-07-07 19:12:28 +02:00
|
|
|
|
// Flags configures the global command-line interface (CLI) parameters.
|
2022-04-22 17:38:40 +02:00
|
|
|
|
var Flags = CliFlags{
|
2022-10-11 22:44:11 +02:00
|
|
|
|
{
|
2022-07-07 19:12:28 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "auth-mode, a",
|
|
|
|
|
Usage: "authentication `MODE` (public, password)",
|
|
|
|
|
Value: "password",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("AUTH_MODE"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-10-03 22:59:29 +02:00
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "public, p",
|
|
|
|
|
Hidden: true,
|
|
|
|
|
Usage: "disable authentication, advanced settings, and WebDAV remote access",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("PUBLIC"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-09-02 21:30:50 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "admin-user, login",
|
2022-11-22 22:14:34 +01:00
|
|
|
|
Usage: "superadmin `USERNAME`",
|
2022-09-02 21:30:50 +02:00
|
|
|
|
Value: "admin",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("ADMIN_USER"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "admin-password, pw",
|
2022-11-22 22:14:34 +01:00
|
|
|
|
Usage: fmt.Sprintf("initial superadmin `PASSWORD` (minimum %d characters)", entity.PasswordLength),
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("ADMIN_PASSWORD"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-10-03 22:59:29 +02:00
|
|
|
|
Flag: cli.Int64Flag{
|
2022-10-25 06:19:56 +02:00
|
|
|
|
Name: "session-maxage",
|
|
|
|
|
Value: DefaultSessionMaxAge,
|
|
|
|
|
Usage: "time in `SECONDS` until API sessions expire automatically (-1 to disable)",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("SESSION_MAXAGE"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-10-03 22:59:29 +02:00
|
|
|
|
Flag: cli.Int64Flag{
|
2022-10-25 06:19:56 +02:00
|
|
|
|
Name: "session-timeout",
|
|
|
|
|
Value: DefaultSessionTimeout,
|
|
|
|
|
Usage: "time in `SECONDS` until API sessions expire due to inactivity (-1 to disable)",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("SESSION_TIMEOUT"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "log-level, l",
|
|
|
|
|
Usage: "log message verbosity `LEVEL` (trace, debug, info, warning, error, fatal, panic)",
|
|
|
|
|
Value: "info",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("LOG_LEVEL"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-08-31 18:53:04 +02:00
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "prod",
|
|
|
|
|
Hidden: true,
|
|
|
|
|
Usage: "enable production mode, hide non-essential log messages",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("PROD"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "debug",
|
|
|
|
|
Usage: "enable debug mode, show non-essential log messages",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DEBUG"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "trace",
|
|
|
|
|
Usage: "enable trace mode, show all log messages",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("TRACE"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "test",
|
|
|
|
|
Hidden: true,
|
|
|
|
|
Usage: "enable test mode",
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "unsafe",
|
|
|
|
|
Hidden: true,
|
2022-04-22 18:24:59 +02:00
|
|
|
|
Usage: "disable safety checks",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("UNSAFE"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "demo",
|
|
|
|
|
Hidden: true,
|
|
|
|
|
Usage: "enable demo mode",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DEMO"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "sponsor",
|
|
|
|
|
Hidden: true,
|
|
|
|
|
Usage: "your continuous support helps to pay for development and operating expenses",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("SPONSOR"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "partner-id",
|
|
|
|
|
Hidden: true,
|
|
|
|
|
Usage: "hosting partner id",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("PARTNER_ID"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "config-path, c",
|
|
|
|
|
Usage: "config storage `PATH`, values in options.yml override CLI flags and environment variables if present",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("CONFIG_PATH"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
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",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DEFAULTS_YAML"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "originals-path, o",
|
|
|
|
|
Usage: "storage `PATH` of your original media files (photos and videos)",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("ORIGINALS_PATH"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.IntFlag{
|
|
|
|
|
Name: "originals-limit, mb",
|
|
|
|
|
Value: 1000,
|
|
|
|
|
Usage: "maximum size of media files in `MB` (1-100000; -1 to disable)",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("ORIGINALS_LIMIT"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.IntFlag{
|
|
|
|
|
Name: "resolution-limit, mp",
|
2022-09-18 14:06:13 +02:00
|
|
|
|
Value: DefaultResolutionLimit,
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Usage: "maximum resolution of media files in `MEGAPIXELS` (1-900; -1 to disable)",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("RESOLUTION_LIMIT"),
|
2023-02-27 15:29:03 +01:00
|
|
|
|
}}, {
|
2023-03-14 23:17:12 +01:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "users-path",
|
|
|
|
|
Usage: "relative `PATH` to create base and upload subdirectories for users",
|
|
|
|
|
Value: "users",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("USERS_PATH"),
|
2023-03-14 23:17:12 +01:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "storage-path, s",
|
|
|
|
|
Usage: "writable storage `PATH` for sidecar, cache, and database files",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("STORAGE_PATH"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "sidecar-path, sc",
|
|
|
|
|
Usage: "custom relative or absolute sidecar `PATH` *optional*",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("SIDECAR_PATH"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "backup-path, ba",
|
|
|
|
|
Usage: "custom backup `PATH` for index backup files *optional*",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("BACKUP_PATH"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "cache-path, ca",
|
|
|
|
|
Usage: "custom cache `PATH` for sessions and thumbnail files *optional*",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("CACHE_PATH"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "import-path, im",
|
|
|
|
|
Usage: "base `PATH` from which files can be imported to originals *optional*",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("IMPORT_PATH"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-09-30 00:42:19 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "import-dest",
|
|
|
|
|
Usage: "relative originals `PATH` to which the files should be imported by default *optional*",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("IMPORT_DEST"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "assets-path, as",
|
|
|
|
|
Usage: "assets `PATH` containing static resources like icons, models, and translations",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("ASSETS_PATH"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "temp-path, tmp",
|
|
|
|
|
Usage: "temporary file `PATH` *optional*",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("TEMP_PATH"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.IntFlag{
|
|
|
|
|
Name: "workers, w",
|
|
|
|
|
Usage: "maximum `NUMBER` of indexing workers, default depends on the number of physical cores",
|
|
|
|
|
Value: cpuid.CPU.PhysicalCores / 2,
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("WORKERS"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "wakeup-interval, i",
|
|
|
|
|
Usage: "`DURATION` between worker runs required for face recognition and index maintenance (1-86400s)",
|
|
|
|
|
Value: DefaultWakeupInterval.String(),
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("WAKEUP_INTERVAL"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.IntFlag{
|
|
|
|
|
Name: "auto-index",
|
|
|
|
|
Usage: "WebDAV auto index safety delay in `SECONDS` (-1 to disable)",
|
|
|
|
|
Value: DefaultAutoIndexDelay,
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("AUTO_INDEX"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.IntFlag{
|
|
|
|
|
Name: "auto-import",
|
|
|
|
|
Usage: "WebDAV auto import safety delay in `SECONDS` (-1 to disable)",
|
|
|
|
|
Value: DefaultAutoImportDelay,
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("AUTO_IMPORT"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "read-only, r",
|
|
|
|
|
Usage: "disable import, upload, delete, and all other operations that require write permissions",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("READONLY"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "experimental, e",
|
|
|
|
|
Usage: "enable experimental features",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("EXPERIMENTAL"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "disable-webdav",
|
|
|
|
|
Usage: "disable built-in WebDAV server",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DISABLE_WEBDAV"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "disable-settings",
|
|
|
|
|
Usage: "disable settings UI and API",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DISABLE_SETTINGS"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "disable-places",
|
|
|
|
|
Usage: "disable reverse geocoding and maps",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DISABLE_PLACES"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "disable-backups",
|
|
|
|
|
Usage: "disable backing up albums and photo metadata to YAML files",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DISABLE_BACKUPS"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "disable-tensorflow",
|
|
|
|
|
Usage: "disable all features depending on TensorFlow",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DISABLE_TENSORFLOW"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "disable-faces",
|
2022-07-29 17:57:54 +02:00
|
|
|
|
Usage: "disable face detection and recognition (requires TensorFlow)",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DISABLE_FACES"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "disable-classification",
|
2022-07-29 17:57:54 +02:00
|
|
|
|
Usage: "disable image classification (requires TensorFlow)",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DISABLE_CLASSIFICATION"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2023-02-11 20:18:04 +01:00
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "disable-sips",
|
|
|
|
|
Usage: "disable conversion of media files with Sips *macOS only*",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DISABLE_SIPS"),
|
2023-02-11 20:18:04 +01:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "disable-ffmpeg",
|
|
|
|
|
Usage: "disable video transcoding and thumbnail extraction with FFmpeg",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DISABLE_FFMPEG"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "disable-exiftool",
|
|
|
|
|
Usage: "disable creating JSON metadata sidecar files with ExifTool",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DISABLE_EXIFTOOL"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "disable-darktable",
|
2023-02-11 20:18:04 +01:00
|
|
|
|
Usage: "disable conversion of RAW images with Darktable",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DISABLE_DARKTABLE"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "disable-rawtherapee",
|
2023-02-11 20:18:04 +01:00
|
|
|
|
Usage: "disable conversion of RAW images with RawTherapee",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DISABLE_RAWTHERAPEE"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.BoolFlag{
|
2023-02-11 20:18:04 +01:00
|
|
|
|
Name: "disable-imagemagick",
|
|
|
|
|
Usage: "disable conversion of image files with ImageMagick",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DISABLE_IMAGEMAGICK"),
|
2023-02-11 20:18:04 +01:00
|
|
|
|
}}, {
|
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "disable-heifconvert",
|
|
|
|
|
Usage: "disable conversion of HEIC images with libheif",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DISABLE_HEIFCONVERT"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2023-02-14 14:43:49 +01:00
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "disable-jpegxl",
|
|
|
|
|
Usage: "disable JPEG XL file format support",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DISABLE_JPEGXL"),
|
2023-02-14 14:43:49 +01:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "disable-raw",
|
2023-02-11 20:18:04 +01:00
|
|
|
|
Usage: "disable indexing and conversion of RAW images",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DISABLE_RAW"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "raw-presets",
|
2023-02-11 20:18:04 +01:00
|
|
|
|
Usage: "enables applying user presets when converting RAW images (reduces performance)",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("RAW_PRESETS"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "exif-bruteforce",
|
|
|
|
|
Usage: "always perform a brute-force search if no Exif headers were found",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("EXIF_BRUTEFORCE"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "detect-nsfw",
|
2022-07-22 09:59:08 +02:00
|
|
|
|
Usage: "automatically flag photos as private that MAY be offensive (requires TensorFlow)",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DETECT_NSFW"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "upload-nsfw, n",
|
2022-07-22 09:59:08 +02:00
|
|
|
|
Usage: "allow uploads that MAY be offensive (no effect without TensorFlow)",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("UPLOAD_NSFW"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "default-locale, lang",
|
|
|
|
|
Usage: "standard user interface language `CODE`",
|
|
|
|
|
Value: i18n.Default.Locale(),
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DEFAULT_LOCALE"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "default-theme",
|
|
|
|
|
Usage: "standard user interface theme `NAME`",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DEFAULT_THEME"),
|
2022-04-22 17:38:40 +02:00
|
|
|
|
},
|
2022-10-11 22:44:11 +02:00
|
|
|
|
Tags: []string{EnvSponsor}}, {
|
2023-02-10 15:53:01 +01:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "app-name",
|
|
|
|
|
Usage: "progressive web app `NAME` when installed on a device",
|
|
|
|
|
Value: "",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("APP_NAME"),
|
2023-02-10 15:53:01 +01:00
|
|
|
|
},
|
|
|
|
|
Tags: []string{EnvSponsor}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "app-mode",
|
|
|
|
|
Usage: "progressive web app `MODE` (fullscreen, standalone, minimal-ui, browser)",
|
|
|
|
|
Value: "standalone",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("APP_MODE"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "app-icon",
|
2023-02-10 15:53:01 +01:00
|
|
|
|
Usage: "home screen `ICON` (logo, app, crisp, mint, bold)",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("APP_ICON"),
|
2022-04-22 17:38:40 +02:00
|
|
|
|
},
|
2022-10-11 22:44:11 +02:00
|
|
|
|
Tags: []string{EnvSponsor}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
2023-02-10 15:53:01 +01:00
|
|
|
|
Name: "app-color",
|
|
|
|
|
Usage: "splash screen `COLOR` code",
|
|
|
|
|
Value: "#000000",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("APP_COLOR"),
|
2023-02-10 15:53:01 +01:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "imprint",
|
2022-10-24 12:33:03 +02:00
|
|
|
|
Usage: "legal information `TEXT`, displayed in the page footer",
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Value: "",
|
2022-10-24 12:33:03 +02:00
|
|
|
|
Hidden: true,
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("IMPRINT"),
|
2022-04-22 17:38:40 +02:00
|
|
|
|
},
|
2022-10-11 22:44:11 +02:00
|
|
|
|
Tags: []string{EnvSponsor}}, {
|
2022-10-24 12:33:03 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "legal-info",
|
|
|
|
|
Usage: "legal information `TEXT`, displayed in the page footer",
|
|
|
|
|
Value: "",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("LEGAL_INFO"),
|
2022-10-24 12:33:03 +02:00
|
|
|
|
},
|
|
|
|
|
Tags: []string{EnvSponsor}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "imprint-url",
|
|
|
|
|
Usage: "legal information `URL`",
|
|
|
|
|
Value: "",
|
2022-10-24 12:33:03 +02:00
|
|
|
|
Hidden: true,
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("IMPRINT_URL"),
|
2022-04-22 17:38:40 +02:00
|
|
|
|
},
|
2022-10-11 22:44:11 +02:00
|
|
|
|
Tags: []string{EnvSponsor}}, {
|
2022-10-24 12:33:03 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "legal-url",
|
|
|
|
|
Usage: "legal information `URL`",
|
|
|
|
|
Value: "",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("LEGAL_URL"),
|
2022-10-24 12:33:03 +02:00
|
|
|
|
},
|
|
|
|
|
Tags: []string{EnvSponsor}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "wallpaper-uri",
|
|
|
|
|
Usage: "login screen background image `URI`",
|
|
|
|
|
Value: "",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("WALLPAPER_URI"),
|
2023-03-02 16:52:05 +01:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "cdn-url",
|
|
|
|
|
Usage: "content delivery network `URL`",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("CDN_URL"),
|
2022-04-22 17:38:40 +02:00
|
|
|
|
},
|
2022-10-11 22:44:11 +02:00
|
|
|
|
Tags: []string{EnvSponsor}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "site-url, url",
|
|
|
|
|
Usage: "public site `URL`",
|
2022-10-20 16:19:28 +02:00
|
|
|
|
Value: "http://photoprism.me:2342/",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("SITE_URL"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "site-author",
|
|
|
|
|
Usage: "site `OWNER`, copyright, or artist",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("SITE_AUTHOR"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "site-title",
|
|
|
|
|
Usage: "site `TITLE`",
|
|
|
|
|
Value: "",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("SITE_TITLE"),
|
2022-04-22 17:38:40 +02:00
|
|
|
|
},
|
2022-10-11 22:44:11 +02:00
|
|
|
|
Tags: []string{EnvSponsor}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "site-caption",
|
|
|
|
|
Usage: "site `CAPTION`",
|
|
|
|
|
Value: "AI-Powered Photos App",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("SITE_CAPTION"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "site-description",
|
|
|
|
|
Usage: "site `DESCRIPTION` *optional*",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("SITE_DESCRIPTION"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "site-preview",
|
|
|
|
|
Usage: "sharing preview image `URL`",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("SITE_PREVIEW"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}, Tags: []string{EnvSponsor}}, {
|
2023-01-19 20:46:27 +01:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "https-proxy",
|
2023-01-20 00:37:51 +01:00
|
|
|
|
Usage: "proxy server `URL` to be used for outgoing connections *optional*",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("HTTPS_PROXY"),
|
2023-01-19 20:46:27 +01:00
|
|
|
|
}}, {
|
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "https-proxy-insecure",
|
2023-01-20 00:37:51 +01:00
|
|
|
|
Usage: "ignore invalid HTTPS certificates when using a proxy",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("HTTPS_PROXY_INSECURE"),
|
2023-01-19 20:46:27 +01:00
|
|
|
|
}}, {
|
2022-10-11 22:44:11 +02:00
|
|
|
|
Flag: cli.StringSliceFlag{
|
2022-10-12 14:57:33 +02:00
|
|
|
|
Name: "trusted-proxy",
|
2022-11-03 07:54:18 +01:00
|
|
|
|
Usage: "`CIDR` range from which reverse proxy headers can be trusted",
|
2022-10-11 22:44:11 +02:00
|
|
|
|
Value: &cli.StringSlice{header.CidrDockerInternal},
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("TRUSTED_PROXY"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-10-19 05:09:09 +02:00
|
|
|
|
Flag: cli.StringSliceFlag{
|
2022-11-02 18:55:30 +01:00
|
|
|
|
Name: "proxy-proto-header",
|
2022-10-19 05:09:09 +02:00
|
|
|
|
Usage: "proxy protocol header `NAME`",
|
|
|
|
|
Value: &cli.StringSlice{header.ForwardedProto},
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("PROXY_PROTO_HEADER"),
|
2022-10-19 05:09:09 +02:00
|
|
|
|
}}, {
|
|
|
|
|
Flag: cli.StringSliceFlag{
|
2022-11-02 18:55:30 +01:00
|
|
|
|
Name: "proxy-proto-https",
|
2022-10-19 05:09:09 +02:00
|
|
|
|
Usage: "forwarded HTTPS protocol `NAME`",
|
|
|
|
|
Value: &cli.StringSlice{header.ProtoHttps},
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("PROXY_PROTO_HTTPS"),
|
2022-10-19 05:09:09 +02:00
|
|
|
|
}}, {
|
2022-10-25 06:19:56 +02:00
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "disable-tls",
|
|
|
|
|
Usage: "disable HTTPS even if a certificate is available",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DISABLE_TLS"),
|
2022-10-25 06:19:56 +02:00
|
|
|
|
}}, {
|
2023-01-15 15:36:20 +01:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "tls-email",
|
|
|
|
|
Usage: "`EMAIL` address to enable automatic HTTPS via Let's Encrypt",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("TLS_EMAIL"),
|
2023-01-15 15:36:20 +01:00
|
|
|
|
Hidden: true,
|
|
|
|
|
}}, {
|
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "tls-cert",
|
|
|
|
|
Usage: "public HTTPS certificate `FILE` (.crt)",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("TLS_CERT"),
|
2023-01-15 15:36:20 +01:00
|
|
|
|
}}, {
|
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "tls-key",
|
|
|
|
|
Usage: "private HTTPS key `FILE` (.key)",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("TLS_KEY"),
|
2023-01-15 15:36:20 +01:00
|
|
|
|
}}, {
|
2023-01-20 00:37:51 +01:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "http-mode, mode",
|
|
|
|
|
Usage: "Web server `MODE` (debug, release, test)",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("HTTP_MODE"),
|
2023-01-20 00:37:51 +01:00
|
|
|
|
}}, {
|
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "http-compression, z",
|
|
|
|
|
Usage: "Web server compression `METHOD` (gzip, none)",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("HTTP_COMPRESSION"),
|
2023-01-20 00:37:51 +01:00
|
|
|
|
}}, {
|
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "http-host, ip",
|
|
|
|
|
Usage: "Web server `IP` address",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("HTTP_HOST"),
|
2023-01-20 00:37:51 +01:00
|
|
|
|
}}, {
|
|
|
|
|
Flag: cli.IntFlag{
|
|
|
|
|
Name: "http-port, port",
|
|
|
|
|
Value: 2342,
|
|
|
|
|
Usage: "Web server port `NUMBER`",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("HTTP_PORT"),
|
2023-01-20 00:37:51 +01:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "database-driver, db",
|
|
|
|
|
Usage: "database `DRIVER` (sqlite, mysql)",
|
|
|
|
|
Value: "sqlite",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DATABASE_DRIVER"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "database-dsn, dsn",
|
|
|
|
|
Usage: "database connection `DSN` (sqlite file, optional for mysql)",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DATABASE_DSN"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "database-name, db-name",
|
|
|
|
|
Value: "photoprism",
|
|
|
|
|
Usage: "database schema `NAME`",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DATABASE_NAME"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-09-15 07:29:09 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "database-server, db-server",
|
|
|
|
|
Usage: "database `HOST` incl. port e.g. \"mariadb:3306\" (or socket path)",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DATABASE_SERVER"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "database-user, db-user",
|
|
|
|
|
Value: "photoprism",
|
|
|
|
|
Usage: "database user `NAME`",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DATABASE_USER"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "database-password, db-pass",
|
|
|
|
|
Usage: "database user `PASSWORD`",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DATABASE_PASSWORD"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.IntFlag{
|
|
|
|
|
Name: "database-conns",
|
|
|
|
|
Usage: "maximum `NUMBER` of open database connections",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DATABASE_CONNS"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.IntFlag{
|
|
|
|
|
Name: "database-conns-idle",
|
|
|
|
|
Usage: "maximum `NUMBER` of idle database connections",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DATABASE_CONNS_IDLE"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2023-02-11 20:18:04 +01:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "sips-bin",
|
|
|
|
|
Usage: "Sips `COMMAND` for media file conversion *macOS only*",
|
|
|
|
|
Value: "sips",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("SIPS_BIN"),
|
2023-02-11 20:18:04 +01:00
|
|
|
|
}}, {
|
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "sips-blacklist",
|
|
|
|
|
Usage: "do not use Sips to convert files with these `EXTENSIONS` *macOS only*",
|
|
|
|
|
Value: "avif,avifs",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("SIPS_BLACKLIST"),
|
2023-02-11 20:18:04 +01:00
|
|
|
|
}}, {
|
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "ffmpeg-bin",
|
|
|
|
|
Usage: "FFmpeg `COMMAND` for video transcoding and thumbnail extraction",
|
|
|
|
|
Value: "ffmpeg",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("FFMPEG_BIN"),
|
2023-02-11 20:18:04 +01:00
|
|
|
|
}}, {
|
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "ffmpeg-encoder, vc",
|
|
|
|
|
Usage: "FFmpeg AVC encoder `NAME`",
|
|
|
|
|
Value: "libx264",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("FFMPEG_ENCODER"),
|
2023-02-11 20:18:04 +01:00
|
|
|
|
},
|
|
|
|
|
Tags: []string{EnvSponsor}}, {
|
|
|
|
|
Flag: cli.IntFlag{
|
|
|
|
|
Name: "ffmpeg-bitrate, vb",
|
|
|
|
|
Usage: "maximum FFmpeg encoding `BITRATE` (Mbit/s)",
|
|
|
|
|
Value: 50,
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("FFMPEG_BITRATE"),
|
2023-02-11 20:18:04 +01:00
|
|
|
|
}}, {
|
2023-03-14 18:00:55 +01:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "ffmpeg-map-video",
|
|
|
|
|
Usage: "video `STREAMS` that should be transcoded",
|
|
|
|
|
Value: ffmpeg.MapVideoDefault,
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("FFMPEG_MAP_VIDEO"),
|
2023-03-14 18:00:55 +01:00
|
|
|
|
}}, {
|
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "ffmpeg-map-audio",
|
|
|
|
|
Usage: "audio `STREAMS` that should be transcoded",
|
|
|
|
|
Value: ffmpeg.MapAudioDefault,
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("FFMPEG_MAP_AUDIO"),
|
2023-03-14 18:00:55 +01:00
|
|
|
|
}}, {
|
2023-02-11 20:18:04 +01:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "exiftool-bin",
|
|
|
|
|
Usage: "ExifTool `COMMAND` for extracting metadata",
|
|
|
|
|
Value: "exiftool",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("EXIFTOOL_BIN"),
|
2023-02-11 20:18:04 +01:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "darktable-bin",
|
|
|
|
|
Usage: "Darktable CLI `COMMAND` for RAW to JPEG conversion",
|
|
|
|
|
Value: "darktable-cli",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DARKTABLE_BIN"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "darktable-blacklist",
|
|
|
|
|
Usage: "do not use Darktable to convert files with these `EXTENSIONS`",
|
2022-10-07 16:45:49 +02:00
|
|
|
|
Value: "",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DARKTABLE_BLACKLIST"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "darktable-cache-path",
|
|
|
|
|
Usage: "custom Darktable cache `PATH`",
|
|
|
|
|
Value: "",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DARKTABLE_CACHE_PATH"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "darktable-config-path",
|
|
|
|
|
Usage: "custom Darktable config `PATH`",
|
|
|
|
|
Value: "",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DARKTABLE_CONFIG_PATH"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "rawtherapee-bin",
|
|
|
|
|
Usage: "RawTherapee CLI `COMMAND` for RAW to JPEG conversion",
|
|
|
|
|
Value: "rawtherapee-cli",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("RAWTHERAPEE_BIN"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "rawtherapee-blacklist",
|
|
|
|
|
Usage: "do not use RawTherapee to convert files with these `EXTENSIONS`",
|
2022-10-07 16:45:49 +02:00
|
|
|
|
Value: "dng",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("RAWTHERAPEE_BLACKLIST"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
2023-02-11 20:18:04 +01:00
|
|
|
|
Name: "imagemagick-bin",
|
|
|
|
|
Usage: "ImageMagick CLI `COMMAND` for image file conversion",
|
|
|
|
|
Value: "convert",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("IMAGEMAGICK_BIN"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-09-15 00:43:08 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
2023-02-11 20:18:04 +01:00
|
|
|
|
Name: "imagemagick-blacklist",
|
|
|
|
|
Usage: "do not use ImageMagick to convert files with these `EXTENSIONS`",
|
2023-02-22 16:33:33 +01:00
|
|
|
|
Value: "heif,heic,heics,avif,avifs,jxl",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("IMAGEMAGICK_BLACKLIST"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "heifconvert-bin",
|
2023-02-11 20:18:04 +01:00
|
|
|
|
Usage: "libheif HEIC image conversion `COMMAND`",
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Value: "heif-convert",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("HEIFCONVERT_BIN"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "download-token",
|
2022-10-25 06:19:56 +02:00
|
|
|
|
Usage: "`DEFAULT` download URL token for originals (leave empty for a random value)",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("DOWNLOAD_TOKEN"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "preview-token",
|
2022-10-25 06:19:56 +02:00
|
|
|
|
Usage: "`DEFAULT` thumbnail and video streaming URL token (leave empty for a random value)",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("PREVIEW_TOKEN"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "thumb-color",
|
|
|
|
|
Usage: "standard color `PROFILE` for thumbnails (leave blank to disable)",
|
|
|
|
|
Value: "sRGB",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("THUMB_COLOR"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "thumb-filter, filter",
|
|
|
|
|
Usage: "image downscaling filter `NAME` (best to worst: blackman, lanczos, cubic, linear)",
|
|
|
|
|
Value: "lanczos",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("THUMB_FILTER"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.IntFlag{
|
|
|
|
|
Name: "thumb-size",
|
|
|
|
|
Usage: "maximum size of thumbnails created during indexing in `PIXELS` (720-7680)",
|
|
|
|
|
Value: 2048,
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("THUMB_SIZE"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.IntFlag{
|
|
|
|
|
Name: "thumb-size-uncached",
|
|
|
|
|
Usage: "maximum size of missing thumbnails created on demand in `PIXELS` (720-7680)",
|
|
|
|
|
Value: 7680,
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("THUMB_SIZE_UNCACHED"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.BoolFlag{
|
|
|
|
|
Name: "thumb-uncached, u",
|
|
|
|
|
Usage: "enable on-demand creation of missing thumbnails (high memory and cpu usage)",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("THUMB_UNCACHED"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "jpeg-quality, q",
|
2022-07-22 09:59:08 +02:00
|
|
|
|
Usage: "a higher value increases the `QUALITY` and file size of JPEG images and thumbnails (25-100)",
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Value: thumb.JpegQuality.String(),
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("JPEG_QUALITY"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.IntFlag{
|
|
|
|
|
Name: "jpeg-size",
|
|
|
|
|
Usage: "maximum size of created JPEG sidecar files in `PIXELS` (720-30000)",
|
|
|
|
|
Value: 7680,
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("JPEG_SIZE"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2023-02-11 20:18:04 +01:00
|
|
|
|
Flag: cli.IntFlag{
|
|
|
|
|
Name: "png-size",
|
|
|
|
|
Usage: "maximum size of created PNG sidecar files in `PIXELS` (720-30000)",
|
|
|
|
|
Value: 7680,
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("PNG_SIZE"),
|
2023-02-11 20:18:04 +01:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.IntFlag{
|
|
|
|
|
Name: "face-size",
|
|
|
|
|
Usage: "minimum size of faces in `PIXELS` (20-10000)",
|
|
|
|
|
Value: face.SizeThreshold,
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("FACE_SIZE"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.Float64Flag{
|
|
|
|
|
Name: "face-score",
|
|
|
|
|
Usage: "minimum face `QUALITY` score (1-100)",
|
|
|
|
|
Value: face.ScoreThreshold,
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("FACE_SCORE"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.IntFlag{
|
|
|
|
|
Name: "face-overlap",
|
|
|
|
|
Usage: "face area overlap threshold in `PERCENT` (1-100)",
|
|
|
|
|
Value: face.OverlapThreshold,
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("FACE_OVERLAP"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.IntFlag{
|
|
|
|
|
Name: "face-cluster-size",
|
|
|
|
|
Usage: "minimum size of automatically clustered faces in `PIXELS` (20-10000)",
|
|
|
|
|
Value: face.ClusterSizeThreshold,
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("FACE_CLUSTER_SIZE"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}, Tags: []string{EnvSponsor}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.IntFlag{
|
|
|
|
|
Name: "face-cluster-score",
|
|
|
|
|
Usage: "minimum `QUALITY` score of automatically clustered faces (1-100)",
|
|
|
|
|
Value: face.ClusterScoreThreshold,
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("FACE_CLUSTER_SCORE"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}, Tags: []string{EnvSponsor}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.IntFlag{
|
|
|
|
|
Name: "face-cluster-core",
|
|
|
|
|
Usage: "`NUMBER` of faces forming a cluster core (1-100)",
|
|
|
|
|
Value: face.ClusterCore,
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("FACE_CLUSTER_CORE"),
|
2022-04-22 17:38:40 +02:00
|
|
|
|
},
|
2022-10-11 22:44:11 +02:00
|
|
|
|
Tags: []string{EnvSponsor}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.Float64Flag{
|
|
|
|
|
Name: "face-cluster-dist",
|
|
|
|
|
Usage: "similarity `DISTANCE` of faces forming a cluster core (0.1-1.5)",
|
|
|
|
|
Value: face.ClusterDist,
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("FACE_CLUSTER_DIST"),
|
2022-04-22 17:38:40 +02:00
|
|
|
|
},
|
2022-10-11 22:44:11 +02:00
|
|
|
|
Tags: []string{EnvSponsor}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.Float64Flag{
|
|
|
|
|
Name: "face-match-dist",
|
|
|
|
|
Usage: "similarity `OFFSET` for matching faces with existing clusters (0.1-1.5)",
|
|
|
|
|
Value: face.MatchDist,
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("FACE_MATCH_DIST"),
|
2022-04-22 17:38:40 +02:00
|
|
|
|
},
|
2022-10-11 22:44:11 +02:00
|
|
|
|
Tags: []string{EnvSponsor}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "pid-filename",
|
|
|
|
|
Usage: "process id `FILE` *daemon-mode only*",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("PID_FILENAME"),
|
2022-10-11 22:44:11 +02:00
|
|
|
|
}}, {
|
2022-04-22 17:38:40 +02:00
|
|
|
|
Flag: cli.StringFlag{
|
|
|
|
|
Name: "log-filename",
|
|
|
|
|
Usage: "server log `FILE` *daemon-mode only*",
|
|
|
|
|
Value: "",
|
2023-03-15 17:05:05 +01:00
|
|
|
|
EnvVar: EnvVar("LOG_FILENAME"),
|
2022-04-22 17:38:40 +02:00
|
|
|
|
}},
|
2018-09-24 09:53:16 +02:00
|
|
|
|
}
|