contextualcode/platformsh-siteaccess-matcher-bundle

Platform.sh adopted eZ Platform Map\Host site access matcher.

Package info

gitlab.com/contextualcode/platformsh-siteaccess-matcher-bundle

Homepage

Issues

Type:ezplatform-bundle

pkg:composer/contextualcode/platformsh-siteaccess-matcher-bundle

Statistics

Installs: 12 972

Dependents: 0

Suggesters: 0

Stars: 0

v2.0.2 2020-03-28 15:43 UTC

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

GPL-2.0-only cf568c27b5595b7c5ac277237ff85784ff60e183

  • Serhey Dolgushev <serhey.woop@contextualcode.com>

ezpublishezplatformplatformsh


README

Paltform.sh allows you to have multiple environments (stage, feature specific and so). But those environments will use autogenerated URLs. And it might be a problem, if you have multiple siteaccesses in your eZ Platform installation and Map\Host matcher is used. This bundle override default Map\Host and tries to extract correct host name from Platform.sh environment variables. Which fixes this issue.

Installation

  1. Require contextualcode/platformsh-siteaccess-matcher-bundle via composer:
     $ composer require contextualcode/platformsh-siteaccess-matcher-bundle
    
  2. Enable this bundle in config/bundles.php:
     return [
     ...
     ContextualCode\PlatformShSiteAccessMatcherBundle\ContextualCodePlatformShSiteAccessMatcherBundle::class => ['all' => true],
     ]
    
  3. Add SITE_ACCESS_MATCHER_DOMAINS_PREFIX variable in .env (it is used when custom Platform.sh environment is synced to failover server):
     ###> contextualcode/platformsh-siteaccess-matcher-bundle ###
     SITE_ACCESS_MATCHER_DOMAINS_PREFIX=
     ###< contextualcode/platformsh-siteaccess-matcher-bundle ###
    
  4. Commit and deploy this changes to Platform.sh:
     $ git add composer.json composer.lock config/bundles.php .env
     $ git commit -m "Installing platformsh-siteaccess-matcher-bundle"
     $ git push platform master
    
  5. Done! All siteaccess will be matched correctly on all new Platform.sh environments with autogenerated URLs.