To use opensearch instead of elasticsearch update the elasticsearch service by opensearch image as follows :
opensearch:
image: opensearchproject/opensearch:1.2.1
ports:
- 9200:9200
options: -e="discovery.type=single-node" -e "plugins.security.disabled=true" -e "plugins.security.ssl.http.enabled=false" --health-cmd="curl http://localhost:9200/_cluster/health" --health-interval=10s --health-timeout=5s --health-retries=10
Full sample :
name: m2-actions-test
on: [push]
jobs:
magento2-build:
runs-on: self-hosted
name: 'm2 tests & build'
services:
mysql:
image: docker://mysql:8.0
env:
MYSQL_ROOT_PASSWORD: magento
MYSQL_DATABASE: magento
ports:
- 3106:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
opensearch:
image: opensearchproject/opensearch:1.2.1
ports:
- 9200:9200
options: -e="discovery.type=single-node" -e "plugins.security.disabled=true" -e "plugins.security.ssl.http.enabled=false" --health-cmd="curl http://localhost:9200/_cluster/health" --health-interval=10s --health-timeout=5s --health-retries=10
steps:
- uses: actions/checkout@v3
- name: 'install fresh magento repo'
if: ${{false}}
#if: always()
uses: MAD-I-T/magento-actions@v3.20
env:
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
with:
process: 'create-project'
magento_version: 2.4.6
no_push: 1
- name: 'launch magento2 build'
if: always()
id: build
uses: MAD-I-T/magento-actions@v3.20
env:
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
with:
process: 'build'