Skip to content

Commit 01fc03c

Browse files
committed
feat!(config,docker): support OpenSearch
1 parent 8f6141f commit 01fc03c

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

config/MWCExtensions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,14 @@ public function ChessBrowser(): self {
132132
return $this->ext( 'ChessBrowser' );
133133
}
134134

135-
public function CirrusSearch(): self {
135+
public function CirrusSearch( bool $useOpenSearch ): self {
136136
// note: this sets the default skin to vector 2022
137137
require_once $this->extensionFilePath( 'CirrusSearch', 'tests/jenkins/FullyFeaturedConfig.php' );
138138
if ( !defined( 'MW_PHPUNIT_TEST' ) ) {
139139
$this->conf( 'wgCirrusSearchServers', [
140140
[
141141
'transport' => \CirrusSearch\Elastica\DeprecationLoggedHttp::class,
142-
"host" => "elasticsearch",
142+
"host" => $useOpenSearch ? "opensearch" : "elasticsearch",
143143
],
144144
] );
145145
}

docker-compose.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@ services:
5050
- discovery.type=single-node
5151
networks: [ mw ]
5252
profiles: [ "elasticsearch" ]
53+
opensearch:
54+
image: docker-registry.wikimedia.org/repos/search-platform/cirrussearch-opensearch-image:v1.3.20-12
55+
volumes:
56+
- osdata:/usr/share/opensearch/data
57+
environment:
58+
- discovery.type=single-node
59+
networks: [ mw ]
60+
profiles: [ "opensearch" ]
5361
mariadb:
5462
image: mariadb:latest
5563
volumes:
@@ -134,6 +142,8 @@ services:
134142
volumes:
135143
esdata:
136144
driver: local
145+
osdata:
146+
driver: local
137147
mariadbdata:
138148
driver: local
139149
mysqldata:

0 commit comments

Comments
 (0)