CloudMigrations: Fix migration in docker (#91147)

This commit is contained in:
lean.dev 2024-07-29 15:00:43 -03:00 committed by GitHub
parent a6088e4ee4
commit d8555019f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 4 deletions

View File

@ -189,7 +189,7 @@ func (s *Service) buildSnapshot(ctx context.Context, signedInUser *user.SignedIn
s.log.Debug(fmt.Sprintf("buildSnapshot: generated keys in %d ms", time.Since(start).Milliseconds()))
// Use GMS public key + the grafana generated private private key to encrypt snapshot files.
// Use GMS public key + the grafana generated private key to encrypt snapshot files.
snapshotWriter, err := snapshot.NewSnapshotWriter(contracts.AssymetricKeys{
Public: snapshotMeta.EncryptionKey,
Private: privateKey[:],

View File

@ -1,7 +1,7 @@
package setting
import (
"os"
"path/filepath"
"time"
)
@ -51,7 +51,6 @@ func (cfg *Cfg) readCloudMigrationSettings() {
cfg.CloudMigration.FeedbackURL = cloudMigration.Key("feedback_url").MustString("")
if cfg.CloudMigration.SnapshotFolder == "" {
homeDir, _ := os.UserHomeDir()
cfg.CloudMigration.SnapshotFolder = homeDir
cfg.CloudMigration.SnapshotFolder = filepath.Join(cfg.DataPath, "cloud_migration")
}
}