diff --git a/global.json b/global.json index 2cb2ac9..2675d76 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,7 @@ { "sdk": { - "version": "5.0.100" + "version": "5.0.100", + "rollForward": "latestFeature", + "allowPrerelease": false } } \ No newline at end of file diff --git a/src/Elastic.Elasticsearch.Managed/ElasticsearchNode.cs b/src/Elastic.Elasticsearch.Managed/ElasticsearchNode.cs index 33ec1fd..5834bfb 100644 --- a/src/Elastic.Elasticsearch.Managed/ElasticsearchNode.cs +++ b/src/Elastic.Elasticsearch.Managed/ElasticsearchNode.cs @@ -47,12 +47,17 @@ private static StartArguments StartArgs(NodeConfiguration config) private static Dictionary EnvVars(NodeConfiguration config) { - if (string.IsNullOrWhiteSpace(config.FileSystem.ConfigPath)) return null; - return new Dictionary + var environmentVariables = new Dictionary { - { config.FileSystem.ConfigEnvironmentVariableName, config.FileSystem.ConfigPath }, - {"ES_HOME", config.FileSystem.ElasticsearchHome} + {"ES_JAVA_OPTS", "-Xms1g -Xmx1g"} }; + if (!string.IsNullOrWhiteSpace(config.FileSystem.ConfigPath)) + environmentVariables.Add(config.FileSystem.ConfigEnvironmentVariableName, config.FileSystem.ConfigPath); + + if (!string.IsNullOrWhiteSpace(config.FileSystem.ElasticsearchHome)) + environmentVariables.Add("ES_HOME", config.FileSystem.ElasticsearchHome); + + return environmentVariables; } ///