add parameter MAGENTO_ELASTICSEARCH_USE_HTTPS for working with Opensearch managed service (#221)
* add parameter MAGENTO_ELASTICSEARCH_USES_HTTPS for working with Opensearch managed service Signed-off-by: Sébastien Allamand <sebastien@allamand.com> * rename to MAGENTO_ELASTICSEARCH_USE_HTTPS Signed-off-by: Sébastien Allamand <sebastien@allamand.com>
This commit is contained in:
parent
8534afb139
commit
078c085ee1
|
|
@ -186,8 +186,16 @@ magento_initialize() {
|
|||
local es_auth="0"
|
||||
is_boolean_yes "$MAGENTO_ELASTICSEARCH_ENABLE_AUTH" && es_auth="1"
|
||||
# Elasticsearch configuration is stored in the database, so we only need to specify for 'setup:install'
|
||||
if is_boolean_yes "$MAGENTO_ELASTICSEARCH_USE_HTTPS"; then
|
||||
magento_install_cli_flags+=(
|
||||
"--elasticsearch-host" "https://$es_host"
|
||||
)
|
||||
else
|
||||
magento_install_cli_flags+=(
|
||||
"--elasticsearch-host" "$es_host"
|
||||
)
|
||||
fi
|
||||
magento_install_cli_flags+=(
|
||||
"--elasticsearch-host" "$es_host"
|
||||
"--elasticsearch-port" "$es_port"
|
||||
"--elasticsearch-enable-auth" "$es_auth"
|
||||
"--elasticsearch-username" "$es_user"
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ magento_env_vars=(
|
|||
MAGENTO_ELASTICSEARCH_HOST
|
||||
MAGENTO_ELASTICSEARCH_PORT_NUMBER
|
||||
MAGENTO_ELASTICSEARCH_ENABLE_AUTH
|
||||
MAGENTO_ELASTICSEARCH_USE_HTTPS
|
||||
MAGENTO_ELASTICSEARCH_USER
|
||||
MAGENTO_ELASTICSEARCH_PASSWORD
|
||||
MAGENTO_USE_SECURE_ADMIN
|
||||
|
|
@ -153,6 +154,7 @@ export MAGENTO_ELASTICSEARCH_PORT_NUMBER="${MAGENTO_ELASTICSEARCH_PORT_NUMBER:-9
|
|||
export MAGENTO_ELASTICSEARCH_ENABLE_AUTH="${MAGENTO_ELASTICSEARCH_ENABLE_AUTH:-no}" # only used during the first initialization
|
||||
export MAGENTO_ELASTICSEARCH_USER="${MAGENTO_ELASTICSEARCH_USER:-}" # only used during the first initialization
|
||||
export MAGENTO_ELASTICSEARCH_PASSWORD="${MAGENTO_ELASTICSEARCH_PASSWORD:-}" # only used during the first initialization
|
||||
export MAGENTO_ELASTICSEARCH_USE_HTTPS="${MAGENTO_ELASTICSEARCH_USE_HTTPS:-no}" # only used during the first initialization
|
||||
|
||||
# PHP configuration
|
||||
export PHP_DEFAULT_MAX_EXECUTION_TIME="18000" # only used at build time
|
||||
|
|
|
|||
|
|
@ -281,6 +281,7 @@ Available environment variables:
|
|||
- `MAGENTO_SEARCH_ENGINE`: Magento search engine. Default: **elasticsearch7**
|
||||
- `MAGENTO_ELASTICSEARCH_HOST`: Elasticsearch server host, if using Elasticsearch as a search engine. Default: **elasticsearch**
|
||||
- `MAGENTO_ELASTICSEARCH_PORT_NUMBER`: Elasticsearch server port number, if using Elasticsearch as a search engine. Default: **9200**
|
||||
- `MAGENTO_ELASTICSEARCH_USE_HTTPS`: Whether to request Elasticsearch server with 'https://' prefix. Default: **no**
|
||||
- `MAGENTO_ELASTICSEARCH_ENABLE_AUTH`: Whether to enable authentication for connections to the Elasticsearch server. Default: **no**
|
||||
- `MAGENTO_ELASTICSEARCH_USER`: Elasticsearch server user login, if using Elasticsearch as a search engine and authentication is enabled. No defaults
|
||||
- `MAGENTO_ELASTICSEARCH_PASSWORD`: Elasticsearch server user password, if using Elasticsearch as a search engine and authentication is enabled. No defaults
|
||||
|
|
|
|||
Loading…
Reference in New Issue