Skip to content

Commit

Permalink
Merge branch 'ezp113'
Browse files Browse the repository at this point in the history
  • Loading branch information
vidarl committed Aug 9, 2018
2 parents 5d618f2 + d840051 commit 677ea54
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .platform.app.yaml
Expand Up @@ -25,6 +25,8 @@ relationships:
# If you wish to have a separate Redis instance for sessions, uncomment
# this relationship and the corresponding service in .platform/services.yaml
#redissession: 'redissession:redis'
# If you wish to use solr, uncomment this relationship and the corresponding service in .platform/services.yaml
#solr: 'solrsearch:solr'

variables:
#php:
Expand Down
18 changes: 18 additions & 0 deletions .platform/services.yaml
Expand Up @@ -33,3 +33,21 @@ rediscache:
#redissession:
# type: redis-persistent:3.2
# disk: 1024

# If you wish to use solr, uncomment this service and the corresponding relationship in .platform.app.yaml.
# Also, you need to generate the config using:
# vendor/ezsystems/ezplatform-solr-search-engine/bin/generate-solr-config.sh
#solrsearch:
# type: solr:6.6
# disk: 512
# configuration:
# configsets:
# mainconfig: !archive "configsets/solr6"
# cores:
# collection1:
# core_properties: |
# configSet=mainconfig
# schema=schema.xml
# endpoints:
# collection1:
# core: collection1
11 changes: 11 additions & 0 deletions app/config/env/platformsh.php
Expand Up @@ -117,3 +117,14 @@
$container->setParameter('ezplatform.session.save_path', sprintf('%s:%d', $endpoint['host'], $endpoint['port']));
}
}

if (isset($relationships['solr'])) {
foreach ($relationships['solr'] as $endpoint) {
if ($endpoint['scheme'] !== 'solr') {
continue;
}

$container->setParameter('search_engine', 'solr');
$container->setParameter('solr_dsn', sprintf('http://%s:%d/%s', $endpoint['host'], $endpoint['port'], 'solr'));
}
}

0 comments on commit 677ea54

Please sign in to comment.