From 979a66f047804327b50509ef49b8de9e5a4dfe55 Mon Sep 17 00:00:00 2001 From: Stephen Wan Date: Thu, 22 Aug 2024 10:40:24 +0800 Subject: [PATCH] Support overriddng the default LiteFS Cloud endpoint --- cmd/litefs/mount_linux.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/litefs/mount_linux.go b/cmd/litefs/mount_linux.go index d472c29..9fba982 100644 --- a/cmd/litefs/mount_linux.go +++ b/cmd/litefs/mount_linux.go @@ -451,6 +451,10 @@ func (c *MountCommand) initBackupConfigFromEnv(ctx context.Context) { return } + if env := strings.TrimSpace(os.Getenv("LITEFS_CLOUD_ENDPOINT")); env != "" { + c.Config.Backup.URL = env + } + // Only set if backup is not configure or if it's configured for LiteFS Cloud. if c.Config.Backup.Type != "" && c.Config.Backup.Type != "litefs-cloud" { return