Skip to content

app/config/config.php is rewritten by app #20

Description

@gilzow

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

  1. deploy nextcloud on psh
  2. create a branch from production environment and activate
  3. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions