Skip to content

Commit

Permalink
Merge pull request #56 from cloud-barista/feature/update-config
Browse files Browse the repository at this point in the history
update : config path
  • Loading branch information
heedaeshin authored Sep 12, 2024
2 parents 564e985 + 0d9cc14 commit 465dc04
Show file tree
Hide file tree
Showing 15 changed files with 229 additions and 650 deletions.
12 changes: 8 additions & 4 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,14 @@ func Init() {
log.Error().Err(err).Msg("Failed to get executable path")
log.Info().Msg("Using Default Config")
}
viper.AddConfigPath(filepath.Join(execPath, "../../data/var/run/data-manager/config"))
viper.AddConfigPath(filepath.Join(execPath, "/data/var/run/data-manager/config"))
viper.AddConfigPath(filepath.Join(execPath, "./"))
viper.AddConfigPath(filepath.Join(execPath, "./config/"))
execDir := filepath.Dir(execPath)
log.Info().Msgf("Executable directory: %s", execDir)

log.Info().Msg(execPath)
viper.AddConfigPath(filepath.Join(execDir, "../../data/var/run/data-manager/config"))
viper.AddConfigPath(filepath.Join(execDir, "./data/var/run/data-manager/config"))
viper.AddConfigPath(filepath.Join(execDir, "./"))
viper.AddConfigPath(filepath.Join(execDir, "./config/"))
viper.SetConfigName("config")

err = viper.ReadInConfig()
Expand Down
18 changes: 0 additions & 18 deletions data/example/Migrate/AwsToNcp.json

This file was deleted.

18 changes: 0 additions & 18 deletions data/example/Migrate/NcpToAws.json

This file was deleted.

10 changes: 0 additions & 10 deletions data/example/NRDB/aws.json

This file was deleted.

10 changes: 0 additions & 10 deletions data/example/NRDB/gcp.json

This file was deleted.

13 changes: 0 additions & 13 deletions data/example/NRDB/ncp.json

This file was deleted.

11 changes: 0 additions & 11 deletions data/example/OBJ/aws.json

This file was deleted.

11 changes: 0 additions & 11 deletions data/example/OBJ/gcp.json

This file was deleted.

12 changes: 0 additions & 12 deletions data/example/OBJ/ncp.json

This file was deleted.

10 changes: 0 additions & 10 deletions data/example/RDB/aws.json

This file was deleted.

Loading

0 comments on commit 465dc04

Please sign in to comment.