configure services individually

Signed-off-by: jkoberg <jkoberg@owncloud.com>
This commit is contained in:
jkoberg
2023-12-13 12:49:54 +01:00
parent bbc4f83f7d
commit ad87ac955a
9 changed files with 14 additions and 7 deletions
-2
View File
@@ -1919,8 +1919,6 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on =
"OCIS_EVENTS_ENABLE_TLS": False,
"MICRO_REGISTRY": "natsjs",
"MICRO_REGISTRY_ADDRESS": "127.0.0.1:9233",
"OCIS_CACHE_STORE": "nats-js-kv",
"OCIS_CACHE_STORE_NODES": "127.0.0.1:9233",
}
if deploy_type == "":
@@ -112,6 +112,7 @@ func DefaultConfig() *config.Config {
HomeNamespace: "/users/{{.Id.OpaqueId}}",
AdditionalInfoAttribute: "{{.Mail}}",
StatCacheType: "nats-js-kv",
StatCacheNodes: []string{"127.0.0.1:9233"},
StatCacheDatabase: "cache-stat",
StatCacheTTL: 300 * time.Second,
ListOCMShares: true,
+2 -2
View File
@@ -85,12 +85,12 @@ type StorageRegistry struct {
// Cache holds cache config
type Cache struct {
StatCacheStore string // TODO: enable configuring this again // `yaml:"stat_cache_store" env:"OCIS_CACHE_STORE;GATEWAY_STAT_CACHE_STORE" desc:"The type of the cache store. Supported values are: 'memory', 'ocmem', 'etcd', 'redis', 'redis-sentinel', 'nats-js', 'noop'. See the text description for details."`
StatCacheStore string // NOTE: The stat cache is not working atm. Hence we block configuring it
StatCacheNodes []string `yaml:"stat_cache_nodes" env:"OCIS_CACHE_STORE_NODES;GATEWAY_STAT_CACHE_STORE_NODES" desc:"A list of nodes to access the configured store. This has no effect when 'memory' or 'ocmem' stores are configured. Note that the behaviour how nodes are used is dependent on the library of the configured store. See the Environment Variable Types description for more details."`
StatCacheDatabase string `yaml:"stat_cache_database" env:"OCIS_CACHE_DATABASE" desc:"The database name the configured store should use."`
StatCacheTTL time.Duration `yaml:"stat_cache_ttl" env:"OCIS_CACHE_TTL;GATEWAY_STAT_CACHE_TTL" desc:"Default time to live for user info in the cache. Only applied when access tokens has no expiration. See the Environment Variable Types description for more details."`
StatCacheSize int `yaml:"stat_cache_size" env:"OCIS_CACHE_SIZE;GATEWAY_STAT_CACHE_SIZE" desc:"The maximum quantity of items in the cache. Only applies when store type 'ocmem' is configured. Defaults to 512 which is derived from the ocmem package though not exclicitely set as default."`
ProviderCacheStore string // `yaml:"provider_cache_store" env:"OCIS_CACHE_STORE;GATEWAY_PROVIDER_CACHE_STORE" desc:"The type of the cache store. Supported values are: 'memory', 'ocmem', 'etcd', 'redis', 'redis-sentinel', 'nats-js', 'noop'. See the text description for details."`
ProviderCacheStore string `yaml:"provider_cache_store" env:"OCIS_CACHE_STORE;GATEWAY_PROVIDER_CACHE_STORE" desc:"The type of the cache store. Supported values are: 'memory', 'ocmem', 'etcd', 'redis', 'redis-sentinel', 'nats-js', 'noop'. See the text description for details."`
ProviderCacheNodes []string `yaml:"provider_cache_nodes" env:"OCIS_CACHE_STORE_NODES;GATEWAY_PROVIDER_CACHE_STORE_NODES" desc:"A list of nodes to access the configured store. This has no effect when 'memory' or 'ocmem' stores are configured. Note that the behaviour how nodes are used is dependent on the library of the configured store. See the Environment Variable Types description for more details."`
ProviderCacheDatabase string `yaml:"provider_cache_database" env:"OCIS_CACHE_DATABASE" desc:"The database name the configured store should use."`
ProviderCacheTTL time.Duration `yaml:"provider_cache_ttl" env:"OCIS_CACHE_TTL;GATEWAY_PROVIDER_CACHE_TTL" desc:"Default time to live for user info in the cache. Only applied when access tokens has no expiration. See the Environment Variable Types description for more details."`
@@ -41,11 +41,14 @@ func DefaultConfig() *config.Config {
Cache: config.Cache{
StatCacheStore: "noop", // NOTE: stat cache not working
StatCacheDatabase: "ocis",
StatCacheNodes: []string{"127.0.0.1:9233"},
StatCacheTTL: 300 * time.Second,
ProviderCacheStore: "noop",
ProviderCacheNodes: []string{"127.0.0.1:9233"},
ProviderCacheDatabase: "cache-providers",
ProviderCacheTTL: 300 * time.Second,
CreateHomeCacheStore: "nats-js-kv",
CreateHomeCacheNodes: []string{"127.0.0.1:9233"},
CreateHomeCacheDatabase: "cache-createhome",
CreateHomeCacheTTL: 300 * time.Second,
},
@@ -97,8 +97,8 @@ func DefaultConfig() *config.Config {
},
Cache: &config.Cache{
Store: "nats-js-kv",
Nodes: []string{"127.0.0.1:9233"},
Database: "cache-roles",
Table: "roles",
TTL: time.Hour * 336,
},
Events: config.Events{
@@ -44,8 +44,8 @@ func DefaultConfig() *config.Config {
SkipUserInfo: false,
UserinfoCache: &config.Cache{
Store: "nats-js-kv",
Nodes: []string{"127.0.0.1:9233"},
Database: "cache-userinfo",
Table: "userinfo",
TTL: time.Second * 10,
},
JWKS: config.JWKS{
@@ -58,6 +58,7 @@ func DefaultConfig() *config.Config {
SystemUserIDP: "internal",
Cache: &config.Cache{
Store: "nats-js-kv",
Nodes: []string{"127.0.0.1:9233"},
Database: "settings-cache",
FileTable: "settings_files",
DirectoryTable: "settings_dirs",
@@ -53,6 +53,7 @@ func DefaultConfig() *config.Config {
},
FileMetadataCache: config.Cache{
Store: "nats-js-kv",
Nodes: []string{"127.0.0.1:9233"},
Database: "cache-filemetadata",
TTL: 24 * 60 * time.Second,
},
@@ -94,17 +94,20 @@ func DefaultConfig() *config.Config {
EnableTLS: false,
},
StatCache: config.StatCache{
Store: "noop",
Store: "nats-js-kv",
Nodes: []string{"127.0.0.1:9233"},
Database: "ocis",
TTL: 300 * time.Second,
},
FilemetadataCache: config.FilemetadataCache{
Store: "nats-js-kv",
Nodes: []string{"127.0.0.1:9233"},
Database: "cache-filemetadata",
TTL: 24 * 60 * time.Second,
},
IDCache: config.IDCache{
Store: "nats-js-kv",
Nodes: []string{"127.0.0.1:9233"},
Database: "ids-storage-users",
TTL: 24 * 60 * time.Second,
},