Neo Oclib + Config Minio For private source
This commit is contained in:
@@ -4,9 +4,11 @@ import (
|
||||
"oc-datacenter/conf"
|
||||
"oc-datacenter/infrastructure"
|
||||
"oc-datacenter/infrastructure/nats"
|
||||
"oc-datacenter/infrastructure/storage"
|
||||
_ "oc-datacenter/routers"
|
||||
|
||||
oclib "cloud.o-forge.io/core/oc-lib"
|
||||
"cloud.o-forge.io/core/oc-lib/config"
|
||||
beego "github.com/beego/beego/v2/server/web"
|
||||
)
|
||||
|
||||
@@ -27,13 +29,20 @@ func main() {
|
||||
conf.GetConfig().MonitorMode = o.GetStringDefault("MONITOR_MODE", "prometheus")
|
||||
conf.GetConfig().MinioRootKey = o.GetStringDefault("MINIO_ADMIN_ACCESS", "")
|
||||
conf.GetConfig().MinioRootSecret = o.GetStringDefault("MINIO_ADMIN_SECRET", "")
|
||||
conf.GetConfig().SourceKeyStorePath = o.GetStringDefault("SOURCE_KEY_STORE_PATH", "/data/source-keys.json")
|
||||
oclib.InitAPI(appname)
|
||||
|
||||
// Initialise le lecteur de la table opaque_key → real_path.
|
||||
// Le fichier est écrit par oc-catalog sur le volume partagé /data.
|
||||
storage.InitSourceKeyStore(conf.GetConfig().SourceKeyStorePath)
|
||||
|
||||
infrastructure.BootstrapAllowedImages()
|
||||
|
||||
go nats.ListenNATS()
|
||||
go infrastructure.WatchBookings()
|
||||
go infrastructure.Watch()
|
||||
|
||||
beego.Run()
|
||||
if config.GetConfig().IsApi {
|
||||
beego.Run()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user