Skip to content

Need to configure settings that don't appear in wp-config.php boilerplate #183

@alexgleason

Description

@alexgleason

Since this image relies on reading empty wp-config.php options, there's no way to include additional settings without overriding wp-config.php.

For instance, because wp-config.php has this line by default,

define('DB_NAME', '');

I am allowed to set DB_NAME with an environment variable.

But since it does not have,

define('ADMIN_COOKIE_PATH', '');

it is not easy for me to dynamically ADMIN_COOKIE_PATH at all.

I suppose I could create a new image based on the wordpress one, and copy in a wp-config.php with blank settings. Then it should work. But should I have to do that for every single project? It's guaranteed that I'm going to need to set SITEURL on local containers, but I actually want it to be the default in production. I also can't unset a blank line with an environment variable (force it to go from an empty string to using the default). Is there a better solution?

I think it might be easier to start with a mostly empty wp-config.php and a list of all possible WordPress options. Environment variables could then be referenced against the possible config options and printed into the file if they exist.

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