2018-09-24 09:53:16 +02:00
|
|
|
package commands
|
|
|
|
|
|
|
|
import "github.com/urfave/cli"
|
|
|
|
|
2018-11-17 13:57:19 +01:00
|
|
|
// Global CLI flags
|
2018-09-24 09:53:16 +02:00
|
|
|
var GlobalFlags = []cli.Flag{
|
|
|
|
cli.BoolFlag{
|
|
|
|
Name: "debug",
|
|
|
|
Usage: "run in debug mode",
|
|
|
|
EnvVar: "PHOTOPRISM_DEBUG",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
|
|
|
Name: "config-file, c",
|
|
|
|
Usage: "load configuration from `FILENAME`",
|
|
|
|
Value: "/etc/photoprism/photoprism.yml",
|
|
|
|
EnvVar: "PHOTOPRISM_CONFIG_FILE",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
|
|
|
Name: "darktable-cli",
|
|
|
|
Usage: "darktable command-line executable `FILENAME`",
|
|
|
|
Value: "/usr/bin/darktable-cli",
|
|
|
|
EnvVar: "PHOTOPRISM_DARKTABLE_CLI",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
|
|
|
Name: "originals-path",
|
|
|
|
Usage: "originals `PATH`",
|
2018-11-08 10:56:11 +01:00
|
|
|
Value: "/srv/photoprism/photos/originals",
|
2018-09-24 09:53:16 +02:00
|
|
|
EnvVar: "PHOTOPRISM_ORIGINALS_PATH",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
|
|
|
Name: "import-path",
|
|
|
|
Usage: "import `PATH`",
|
2018-11-08 10:56:11 +01:00
|
|
|
Value: "/srv/photoprism/photos/import",
|
2018-09-24 09:53:16 +02:00
|
|
|
EnvVar: "PHOTOPRISM_IMPORT_PATH",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
|
|
|
Name: "export-path",
|
|
|
|
Usage: "export `PATH`",
|
2018-11-08 10:56:11 +01:00
|
|
|
Value: "/srv/photoprism/photos/export",
|
2018-09-24 09:53:16 +02:00
|
|
|
EnvVar: "PHOTOPRISM_EXPORT_PATH",
|
|
|
|
},
|
2018-11-09 20:48:23 +01:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "cache-path",
|
|
|
|
Usage: "cache `PATH`",
|
|
|
|
Value: "/srv/photoprism/cache",
|
|
|
|
EnvVar: "PHOTOPRISM_CACHE_PATH",
|
|
|
|
},
|
2018-09-24 09:53:16 +02:00
|
|
|
cli.StringFlag{
|
|
|
|
Name: "assets-path",
|
|
|
|
Usage: "assets `PATH`",
|
2018-11-08 10:56:11 +01:00
|
|
|
Value: "/srv/photoprism",
|
2018-09-24 09:53:16 +02:00
|
|
|
EnvVar: "PHOTOPRISM_ASSETS_PATH",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
|
|
|
Name: "database-driver",
|
2018-12-21 08:44:13 +01:00
|
|
|
Usage: "database `DRIVER` (internal or mysql)",
|
|
|
|
Value: "internal",
|
2018-09-24 09:53:16 +02:00
|
|
|
EnvVar: "PHOTOPRISM_DATABASE_DRIVER",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
|
|
|
Name: "database-dsn",
|
|
|
|
Usage: "database data source name (`DSN`)",
|
2018-12-18 18:38:30 +01:00
|
|
|
Value: "root:@tcp(localhost:4000)/photoprism?parseTime=true",
|
2018-09-24 09:53:16 +02:00
|
|
|
EnvVar: "PHOTOPRISM_DATABASE_DSN",
|
|
|
|
},
|
2018-12-21 04:17:22 +01:00
|
|
|
cli.IntFlag{
|
|
|
|
Name: "http-port, p",
|
|
|
|
Usage: "HTTP server port",
|
|
|
|
Value: 80,
|
|
|
|
EnvVar: "PHOTOPRISM_HTTP_PORT",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
|
|
|
Name: "http-host, i",
|
|
|
|
Usage: "HTTP server host",
|
|
|
|
Value: "",
|
|
|
|
EnvVar: "PHOTOPRISM_HTTP_HOST",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
|
|
|
Name: "http-mode, m",
|
|
|
|
Usage: "debug, release or test",
|
|
|
|
Value: "",
|
|
|
|
EnvVar: "PHOTOPRISM_HTTP_MODE",
|
|
|
|
},
|
|
|
|
cli.IntFlag{
|
|
|
|
Name: "sql-port, s",
|
2018-12-21 08:44:13 +01:00
|
|
|
Usage: "Built-in SQL server port",
|
2018-12-21 04:17:22 +01:00
|
|
|
Value: 4000,
|
|
|
|
EnvVar: "PHOTOPRISM_SQL_PORT",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
|
|
|
Name: "sql-host",
|
2018-12-21 08:44:13 +01:00
|
|
|
Usage: "Built-in SQL server host",
|
2018-12-21 04:17:22 +01:00
|
|
|
Value: "",
|
|
|
|
EnvVar: "PHOTOPRISM_SQL_HOST",
|
|
|
|
},
|
|
|
|
cli.StringFlag{
|
|
|
|
Name: "sql-path",
|
2018-12-21 08:44:13 +01:00
|
|
|
Usage: "Built-in SQL server storage path",
|
2018-12-21 04:17:22 +01:00
|
|
|
Value: "",
|
|
|
|
EnvVar: "PHOTOPRISM_SQL_PATH",
|
|
|
|
},
|
2018-09-24 09:53:16 +02:00
|
|
|
}
|