Skip to content

Commit

Permalink
chore(deps): update opensearchproject/opensearch docker tag to v1.3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
rajadilipkolli committed Sep 21, 2023
1 parent e71a13a commit ae142c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
4 changes: 2 additions & 2 deletions boot-opensearch-sample/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.8'
services:

opensearch:
image: opensearchproject/opensearch:1.1.0
image: opensearchproject/opensearch:1.3.12
container_name: opensearch
hostname: opensearch
ports:
Expand All @@ -14,7 +14,7 @@ services:
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"

opensearch-dashboards:
image: opensearchproject/opensearch-dashboards:1.1.0
image: opensearchproject/opensearch-dashboards:1.3.12
container_name: opensearch_dashboards
ports:
- "5601:5601"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,32 +1,19 @@
package com.example.opensearch.common;

import java.net.HttpURLConnection;
import java.time.Duration;
import org.springframework.boot.test.context.TestConfiguration;
import org.springframework.test.context.DynamicPropertyRegistry;
import org.springframework.test.context.DynamicPropertySource;
import org.testcontainers.containers.GenericContainer;
import org.testcontainers.containers.wait.strategy.HttpWaitStrategy;

@TestConfiguration(proxyBeanMethods = false)
public class ContainersConfig {

static final GenericContainer<?> openSearchContainer =
new GenericContainer<>("opensearchproject/opensearch:1.1.0")
new GenericContainer<>("opensearchproject/opensearch:1.3.12")
.withEnv("discovery.type", "single-node")
.withEnv("DISABLE_SECURITY_PLUGIN", "true")
.withEnv("OPENSEARCH_JAVA_OPTS", "-Xms512m -Xmx512m")
.withExposedPorts(9200, 9600)
.waitingFor(
new HttpWaitStrategy()
.forPort(9200)
.forStatusCodeMatching(
response ->
response == HttpURLConnection.HTTP_OK
|| response
== HttpURLConnection
.HTTP_UNAUTHORIZED)
.withStartupTimeout(Duration.ofMinutes(4)));
.withExposedPorts(9200, 9600);

static {
openSearchContainer.start();
Expand Down

0 comments on commit ae142c9

Please sign in to comment.