Skip to content

Commit 8bbba54

Browse files
committed
Release 2.1.1
Merge branch 'main' into production
2 parents 9af13da + aa20730 commit 8bbba54

File tree

9 files changed

+100
-34
lines changed

9 files changed

+100
-34
lines changed

.circleci/config.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ executors:
1212

1313
# Define shared branch filters as reusable anchors.
1414
branch-filters:
15-
&ignored-branches
16-
branches:
17-
ignore:
18-
- production
19-
- main
20-
- /dependabot\/.*/
21-
# Remove the following filters from actual project configuration.
22-
- /^10\..*/
23-
- /^11\..*/
15+
ignored-branches: &ignored-branches
16+
branches:
17+
ignore:
18+
- production
19+
- main
20+
- /dependabot\/.*/
21+
# Remove the following filters from actual project configuration.
22+
- /^10\..*/
23+
- /^11\..*/
2424

2525
workflows:
2626
commit:
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: elasticsearch
22
repository: ddev/ddev-elasticsearch
33
version: v0.3.2
4-
install_date: "2024-08-13T10:51:11+03:00"
4+
install_date: "2025-03-21T10:53:19+02:00"
55
project_files:
6-
- elasticsearch/config/elasticsearch8.yml
6+
- elasticsearch/
77
- docker-compose.elasticsearch8.yaml
88
global_files: []
99
removal_actions: []

.ddev/config.yaml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,20 @@ web_environment:
2626
- ELASTICSEARCH_HOST=elasticsearch
2727
- VARNISH_ADMIN_HOST=varnish
2828
- VARNISH_ADMIN_PORT=80
29+
- SMTP_ADDRESS=localhost:1025
2930

3031
corepack_enable: false
3132
hooks:
3233
post-start:
3334
- exec: "composer install"
34-
- exec: |
35-
plugins=(analysis-icu analysis-ukrainian)
36-
for plugin in "${plugins[@]}"; do
37-
if ! elasticsearch-plugin list | grep -q "^$plugin\b"; then
38-
elasticsearch-plugin install "$plugin"
39-
else
40-
echo "Plugin $plugin is already installed"
41-
fi
42-
done
43-
service: elasticsearch
35+
- exec: "npm ci"
36+
- exec-host: |
37+
# Run the Elasticsearch plugin setup script
38+
ddev exec -s elasticsearch /mnt/ddev_config/elasticsearch/elasticsearch-setup.sh
39+
40+
# Check for the restart marker file
41+
if [ -f .ddev/elasticsearch/restart_needed ]; then
42+
echo "Elasticsearch plugins installed. Restarting elasticsearch container..."
43+
docker restart ddev-${DDEV_SITENAME}-elasticsearch
44+
rm .ddev/elasticsearch/restart_needed
45+
fi

.ddev/docker-compose.elasticsearch8.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ services:
1414
- VIRTUAL_HOST=$DDEV_HOSTNAME
1515
- HTTP_EXPOSE=9200:9200
1616
- HTTPS_EXPOSE=9201:9200
17+
- ELASTICSEARCH_PLUGINS=analysis-icu
1718
labels:
1819
com.ddev.site-name: ${DDEV_SITENAME}
1920
com.ddev.approot: $DDEV_APPROOT

.ddev/elasticsearch/config/elasticsearch8.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#ddev-generated
21
# This file contains the configuration settings for Elasticsearch 8.
32
# For more information, see https://www.elastic.co/guide/en/elasticsearch/reference/current/settings.html
43

@@ -8,7 +7,8 @@ cluster.name: "docker-cluster"
87
# https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html#network.host
98
network.host: 0.0.0.0
109

11-
# Security settings
10+
# Disable security features
11+
# https://www.elastic.co/guide/en/elasticsearch/reference/current/security-settings.html#general-security-settings
1212
xpack.security.enabled: false
1313
xpack.security.autoconfiguration.enabled: false
1414
xpack.security.enrollment.enabled: false
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/bash
2+
3+
# Exit if no plugins specified
4+
[ -z "$ELASTICSEARCH_PLUGINS" ] && echo "No plugins specified in ELASTICSEARCH_PLUGINS" && exit 0
5+
6+
echo "Installing Elasticsearch plugins: $ELASTICSEARCH_PLUGINS"
7+
needs_restart=false
8+
9+
# Process each plugin
10+
for plugin in $ELASTICSEARCH_PLUGINS; do
11+
# Skip if already installed
12+
if bin/elasticsearch-plugin list | grep -q "$plugin"; then
13+
echo "✓ Plugin $plugin already installed"
14+
continue
15+
fi
16+
17+
# Install plugin
18+
echo "Installing $plugin plugin..."
19+
if bin/elasticsearch-plugin install "$plugin"; then
20+
chown -R elasticsearch:root "/usr/share/elasticsearch/plugins/$plugin" && \
21+
chmod -R 755 "/usr/share/elasticsearch/plugins/$plugin" && \
22+
echo "✓ Plugin $plugin installed successfully" && \
23+
needs_restart=true
24+
else
25+
echo "✗ Failed to install plugin $plugin"
26+
exit 1
27+
fi
28+
done
29+
30+
# Signal for restart if needed
31+
if [ "$needs_restart" = true ]; then
32+
echo "New plugins were installed. Elasticsearch needs to be restarted."
33+
34+
# Create a marker file in the mounted config directory (visible to host)
35+
touch /mnt/ddev_config/elasticsearch/restart_needed
36+
fi
37+
38+
exit 0

.lando.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ services:
125125
# - esdata:/usr/share/elasticsearch/data
126126
# # Install ES plugins.
127127
# build_as_root:
128-
# - elasticsearch-plugin install analysis-icu analysis-ukrainian
128+
# - elasticsearch-plugin install analysis-icu
129129
# volumes:
130130
# esdata:
131131
# driver: local

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,41 @@ For a complete list of all available services, URLs, and ports, use:
121121
- `ddev xdebug <mode>` - Configure Xdebug debugging modes
122122
- `ddev syncdb [environment]` - Sync database from remote environment (requires VPN and `ddev auth ssh`, see `scripts/syncdb.sh` for details)
123123

124+
<details>
125+
<summary>DDEV Elasticsearch configuration</summary>
126+
127+
#### DDEV Elasticsearch configuration
128+
129+
This project includes Elasticsearch service for robust full-text search capabilities. It's automatically set up during DDEV initialization.
130+
131+
##### Plugins configuration
132+
133+
- Pre-configured with `analysis-icu` for Unicode/multilingual text processing
134+
- Additional plugins can be defined in `.ddev/docker-compose.elasticsearch8.yaml`
135+
136+
```yaml
137+
services:
138+
elasticsearch:
139+
environment:
140+
- ELASTICSEARCH_PLUGINS=analysis-icu # Space-separated plugin list
141+
```
142+
143+
##### Useful commands
144+
145+
```bash
146+
# Check Elasticsearch status
147+
ddev exec -s elasticsearch "curl -s localhost:9200"
148+
149+
# List installed plugins
150+
ddev exec -s elasticsearch "bin/elasticsearch-plugin list"
151+
```
152+
153+
##### Web interface
154+
155+
Elasticvue is included for visualization and management at <http://drupal-project.ddev.site:9005>
156+
157+
</details>
158+
124159
<details>
125160
<summary>Lando environment</summary>
126161

web/sites/default/settings.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,16 +105,6 @@
105105
$settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null';
106106
$settings['cache']['bins']['page'] = 'cache.backend.null';
107107
$settings['extension_discovery_scan_tests'] = FALSE;
108-
109-
// Override drupal/symfony_mailer default config to use Mailpit.
110-
if ($env === 'ddev') {
111-
$config['symfony_mailer.settings']['default_transport'] = 'sendmail';
112-
$config['symfony_mailer.mailer_transport.sendmail']['plugin'] = 'smtp';
113-
$config['symfony_mailer.mailer_transport.sendmail']['configuration']['user'] = '';
114-
$config['symfony_mailer.mailer_transport.sendmail']['configuration']['pass'] = '';
115-
$config['symfony_mailer.mailer_transport.sendmail']['configuration']['host'] = 'localhost';
116-
$config['symfony_mailer.mailer_transport.sendmail']['configuration']['port'] = '1025';
117-
}
118108
break;
119109

120110
default:

0 commit comments

Comments
 (0)