Skip to content

Commit

Permalink
Add support for searchengine attribute to specify different search en…
Browse files Browse the repository at this point in the history
…gines (#802)

Some of this will live in docker harness but testing it here atm

related docker harness changes
inviqa/harness-docker#145
  • Loading branch information
andytson-inviqa authored Feb 27, 2024
1 parent 3dd7ae1 commit ec8c87f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .ci/sample-dynamic/workspace.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
workspace('ci-spryker-sample-dynamic'):
description: generated local workspace for ci-spryker-sample.
harnessLayers:
- inviqa/docker:v0.3.0
- https://github.com/inviqa/harness-docker/archive/refs/tags/0.4.0-alpha1.tar.gz
# - inviqa/spryker # installed by test

attribute('aws.bucket'): null
Expand Down
2 changes: 1 addition & 1 deletion .ci/sample-static/workspace.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
workspace('ci-spryker-sample-static'):
description: generated local workspace for ci-spryker-sample.
harnessLayers:
- inviqa/docker:v0.3.0
- https://github.com/inviqa/harness-docker/archive/refs/tags/0.4.0-alpha1.tar.gz
# - inviqa/spryker # installed by test

attribute('app.build'): static
Expand Down
10 changes: 5 additions & 5 deletions application/skeleton/config/Shared/config_local.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@
= PropelConfig::DB_ENGINE_PGSQL;

// ---------- Elasticsearch
$config[SearchElasticsearchConstants::HOST] = getenv('ELASTICSEARCH_HOST', true);
$config[SearchElasticsearchConstants::TRANSPORT] = getenv('ELASTICSEARCH_SCHEME', true) ?: 'http';
$config[SearchElasticsearchConstants::PORT] = getenv('ELASTICSEARCH_PORT', true);
if (getenv('ELASTICSEARCH_USERNAME', true)) {
$config[SearchElasticsearchConstants::AUTH_HEADER] = base64_encode(getenv('ELASTICSEARCH_USERNAME', true) . ':' . getenv('ELASTICSEARCH_PASSWORD', true));
$config[SearchElasticsearchConstants::HOST] = getenv('SEARCHENGINE_HOST', true);
$config[SearchElasticsearchConstants::TRANSPORT] = getenv('SEARCHENGINE_SCHEME', true) ?: 'http';
$config[SearchElasticsearchConstants::PORT] = getenv('SEARCHENGINE_PORT', true);
if (getenv('SEARCHENGINE_USERNAME', true)) {
$config[SearchElasticsearchConstants::AUTH_HEADER] = base64_encode(getenv('SEARCHENGINE_USERNAME', true) . ':' . getenv('SEARCHENGINE_PASSWORD', true));
}
$ELASTICA_INDEX_NAME = strtolower($CURRENT_STORE) . '_search';
$config[CollectorConstants::ELASTICA_PARAMETER__INDEX_NAME] = $ELASTICA_INDEX_NAME;
Expand Down
10 changes: 6 additions & 4 deletions harness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
harness('inviqa/spryker'):
description: A docker based development environment for Spryker
parentLayers:
- inviqa/docker:v0.3.0
- https://github.com/inviqa/harness-docker/archive/refs/tags/0.4.0-alpha1.tar.gz
require:
services:
- proxy
Expand Down Expand Up @@ -42,6 +42,11 @@ attributes:
user: spryker
pass: spryker
name: spryker
searchengine:
platform: elasticsearch
platform_version: >
= version_compare(@('spryker.demoshop-version'), '202009.0', '<=') ? '6'
: '7'
backend:
build:
when: 'true'
Expand Down Expand Up @@ -76,9 +81,6 @@ attributes:
- task spryker:build:frontend
- ~
- ~
elasticsearch:
image: elasticsearch
tag: "= version_compare(@('spryker.demoshop-version'), '202009.0', '<=') ? '6.8.23' : '7.16.3'"
hostname_aliases: "= replace(filter_empty(flatten([
@('glue.external_hosts'),
@('yves.external_hosts'),
Expand Down

0 comments on commit ec8c87f

Please sign in to comment.