Neo Oclib + Config Minio For private source

This commit is contained in:
mr
2026-05-27 16:14:33 +02:00
parent e3e29295ee
commit f7322156e1
13 changed files with 652 additions and 11 deletions
+10 -1
View File
@@ -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()
}
}