Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add More Customization Parameters to ComposeInit.ps1 #135

Open
ddelella opened this issue Aug 12, 2023 · 0 comments
Open

Add More Customization Parameters to ComposeInit.ps1 #135

ddelella opened this issue Aug 12, 2023 · 0 comments

Comments

@ddelella
Copy link

ddelella commented Aug 12, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant