Skip to content

Commit

Permalink
Support overriddng the default LiteFS Cloud endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen committed Sep 24, 2024
1 parent 27f96af commit 979a66f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/litefs/mount_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 979a66f

Please sign in to comment.