Skip to content

Add More Customization Parameters to ComposeInit.ps1 #135

@ddelella

Description

@ddelella

I am frustrated that I cannot configure the container project to the same level as my on-premise project. There is far more flexibility is prefix naming conventions.

REQUEST

  1. Add parameter to ComposeInit.ps1 for $SqlDatabasePrefix
  2. Add parameter to ComposeInit.ps1 for $SqlCommerceDatabasePrefix
  3. Add parameter to ComposeInit.ps1 for $SolrCorePrefix
  4. Add parameter to ComposeInit.ps1 for $SolrCommerceCorePrefix

There already exists, in the .env file, options to customize these values. However, they cannot be provided through the parameters sent to the ComposeInit.ps1 script. I had to write a PowerShell script to overwrite these values before running the ComposeInit.ps1. Here is the script I am using:

(Get-Content "C:\Sitecore\xc1-cxa\.env") -replace "SQL_DATABASE_PREFIX=Sitecore","SQL_DATABASE_PREFIX=rrx" |  Out-File "C:\Sitecore\xc1-cxa\.env"
(Get-Content "C:\Sitecore\xc1-cxa\.env") -replace "SOLR_CORE_PREFIX_NAME=sitecore","SOLR_CORE_PREFIX_NAME=rrx" |  Out-File "C:\Sitecore\xc1-cxa\.env"
(Get-Content "C:\Sitecore\xc1-cxa\.env") -replace "SOLR_COMMERCE_PREFIX_NAME=commerce","SOLR_COMMERCE_PREFIX_NAME=rrx" |  Out-File "C:\Sitecore\xc1-cxa\.env"

The commerce database prefix is the big problem. I searched and replaced all instances of SitecoreCommerce_ with xxx.SitecoreCommerce_ to force the 3 commerce databases to have a prefix. It did not work. No matter what I do to the configuration files it always attaches with the standard naming. I believe there is something in the docker image which is hard coded. Notice the screenshot, no prefixes.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions