Skip to content

Commit

Permalink
Use the right Elasticsearch docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
ejsmith committed Dec 17, 2024
1 parent f91004d commit 2db11fb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static IResourceBuilder<ElasticsearchResource> AddElasticsearch(this IDis

return builder.AddResource(elasticsearch)
.WithImage(ElasticsearchContainerImageTags.Image, ElasticsearchContainerImageTags.Tag)
.WithImageRegistry(ElasticsearchContainerImageTags.Registry)
.WithImageRegistry(ElasticsearchContainerImageTags.ElasticsearchRegistry)
.WithHttpEndpoint(targetPort: ElasticsearchPort, port: port, name: ElasticsearchResource.PrimaryEndpointName)
.WithEndpoint(targetPort: ElasticsearchInternalPort, name: ElasticsearchResource.InternalEndpointName)
.WithEnvironment("discovery.type", "single-node")
Expand Down Expand Up @@ -85,7 +85,7 @@ public static IResourceBuilder<ElasticsearchResource> WithKibana(this IResourceB
var resource = new KibanaResource(containerName);
var resourceBuilder = builder.ApplicationBuilder.AddResource(resource)
.WithImage(ElasticsearchContainerImageTags.KibanaImage, ElasticsearchContainerImageTags.Tag)
.WithImageRegistry(ElasticsearchContainerImageTags.Registry)
.WithImageRegistry(ElasticsearchContainerImageTags.KibanaRegistry)
.WithHttpEndpoint(targetPort: KibanaPort, name: containerName)
.WithEnvironment("xpack.security.enabled", "false")
.ExcludeFromManifest();
Expand Down Expand Up @@ -114,8 +114,9 @@ public static IResourceBuilder<ElasticsearchResource> WithDataBindMount(this IRe

internal static class ElasticsearchContainerImageTags
{
public const string Registry = "docker.elastic.co";
public const string Image = "elasticsearch/elasticsearch";
public const string ElasticsearchRegistry = "docker.io";
public const string Image = "exceptionless/elasticsearch";
public const string KibanaRegistry = "docker.elastic.co";
public const string KibanaImage = "kibana/kibana";
public const string Tag = "8.17.0";
}
1 change: 0 additions & 1 deletion src/Exceptionless.AppHost/Program.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
var builder = DistributedApplication.CreateBuilder(args);

var elastic = builder.AddElasticsearch("Elasticsearch", port: 9200)
.WithImageTag("8.17.0")
.WithLifetime(ContainerLifetime.Persistent)
.WithContainerName("Exceptionless-Elasticsearch")
.WithDataVolume("exceptionless.data.v1")
Expand Down
1 change: 0 additions & 1 deletion tests/Exceptionless.Tests/AppWebHostFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public Task InitializeAsync()

builder.AddElasticsearch("Elasticsearch", port: 9200)
.WithContainerName("Exceptionless-Elasticsearch-Test")
.WithImageTag("8.17.0")
.WithLifetime(ContainerLifetime.Persistent);

_app = builder.Build();
Expand Down

0 comments on commit 2db11fb

Please sign in to comment.