mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 04:48:26 +08:00
config: support multiple storage locations
added support to point multiple storage locations in zot by running multiple instance of zot in background. see examples/config-multiple.json for more info about config. Closes #181
This commit is contained in:
committed by
Ramkumar Chinchani
parent
9ca6eea940
commit
28974e81dc
+9
-2
@@ -72,11 +72,18 @@ type LogConfig struct {
|
||||
Output string
|
||||
}
|
||||
|
||||
type GlobalStorageConfig struct {
|
||||
RootDirectory string
|
||||
Dedupe bool
|
||||
GC bool
|
||||
SubPaths map[string]StorageConfig
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
Version string
|
||||
Commit string
|
||||
BinaryType string
|
||||
Storage StorageConfig
|
||||
Storage GlobalStorageConfig
|
||||
HTTP HTTPConfig
|
||||
Log *LogConfig
|
||||
Extensions *ext.ExtensionConfig
|
||||
@@ -87,7 +94,7 @@ func NewConfig() *Config {
|
||||
Version: dspec.Version,
|
||||
Commit: Commit,
|
||||
BinaryType: BinaryType,
|
||||
Storage: StorageConfig{GC: true, Dedupe: true},
|
||||
Storage: GlobalStorageConfig{GC: true, Dedupe: true},
|
||||
HTTP: HTTPConfig{Address: "127.0.0.1", Port: "8080"},
|
||||
Log: &LogConfig{Level: "debug"},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user