Describe the bug
Upon deployment, the nextcloud application rewrites the config.php file (app/config directory is a mount) converting the code that generates the $CONFIG variable to static values. Therefore, when a development environment is branched, the trusted_domains array contains the domain for the production environment instead of the newly generated development environment causing the dev instance to not function correctly.
Nextcloud does support multiple configuration files in the app/config directory so it's possible we can convert our current config.php file to platformsh.config.php and hopefully have it retain the code to retrieve the current environment domain. If not, we'll need to retrieve the value on deployment and update the trusted_domains array to include the environment domain.
Include some logs
.
Reproducing
- deploy nextcloud on psh
- create a branch from production environment and activate
- Visit the new url
Expected behavior
config.php should populate the values of trusted_domains from PLATFORM_ROUTES
Your environment
.platform.app.yaml
Screenshots
No response
Additional context
No response
Describe the bug
Upon deployment, the nextcloud application rewrites the config.php file (
app/configdirectory is a mount) converting the code that generates the$CONFIGvariable to static values. Therefore, when a development environment is branched, thetrusted_domainsarray contains the domain for the production environment instead of the newly generated development environment causing the dev instance to not function correctly.Nextcloud does support multiple configuration files in the
app/configdirectory so it's possible we can convert our current config.php file toplatformsh.config.phpand hopefully have it retain the code to retrieve the current environment domain. If not, we'll need to retrieve the value on deployment and update thetrusted_domainsarray to include the environment domain.Include some logs
.
Reproducing
Expected behavior
config.php should populate the values of
trusted_domainsfromPLATFORM_ROUTESYour environment
.platform.app.yaml
Screenshots
No response
Additional context
No response