mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 08:44:04 +01:00
Config: Add register fallback to cluster/node/bootstrap.go #98
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -46,7 +46,7 @@ var ClusterThemePullCommand = &cli.Command{
|
||||
func clusterThemePullAction(ctx *cli.Context) error {
|
||||
return CallWithDependencies(ctx, func(conf *config.Config) error {
|
||||
portalURL := ""
|
||||
if ctx.IsSet("portal-url") {
|
||||
if ctx.IsSet("portal-url") && ctx.String("portal-url") != "" {
|
||||
portalURL = strings.TrimRight(ctx.String("portal-url"), "/")
|
||||
}
|
||||
if portalURL == "" {
|
||||
@@ -55,6 +55,11 @@ func clusterThemePullAction(ctx *cli.Context) error {
|
||||
if portalURL == "" {
|
||||
portalURL = strings.TrimRight(os.Getenv(config.EnvVar("portal-url")), "/")
|
||||
}
|
||||
if portalURL == "" {
|
||||
if domain := strings.TrimSpace(conf.ClusterDomain()); domain != "" {
|
||||
portalURL = fmt.Sprintf("https://portal.%s", domain)
|
||||
}
|
||||
}
|
||||
if portalURL == "" {
|
||||
return fmt.Errorf("portal-url not configured; set --portal-url or PHOTOPRISM_PORTAL_URL")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user