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

settings.php override variables - how are they set? #25

Closed
rosiel opened this issue Oct 24, 2023 · 1 comment
Closed

settings.php override variables - how are they set? #25

rosiel opened this issue Oct 24, 2023 · 1 comment

Comments

@rosiel
Copy link
Contributor

rosiel commented Oct 24, 2023

Trying to understand what seems to be a complex chain of how the config override variables are controlled.

  1. In my settings.php file there are lines like $config['islandora.settings']['broker_url'] = file_get_contents($path . 'DRUPAL_DEFAULT_BROKER_URL');
  2. That line was originally in [drupal root]/assets/patches/default_settings.txt in the site template (which during installation of the site template, is copied over the contents of default_settings.txt from the starter site). Due to a line in composer.json of the starter site, this file becomes the basis of settings.php.
  3. file_get_contents($path . 'DRUPAL_DEFAULT_BROKER_URL') means to get the contents of a file. $path is defined above this line as /var/run/s6/container_environment/. That path is not populated by the starter site or the site template as far as I can tell.
  4. Are the contents of /var/run/s6/container_environment/ set by dumping all environment variables there (done by a special command using s6)? Does it only happen if we're using a reverse proxy?
  5. Do the values themselves come from the values in Buildkit's Drupal Dockerfile? Where are some of them overridden so that it's not all islandora.traefik.me? Is it the lines in isle-site-template's docker-compose file? Do they overwrite (one-by-one) or replace (all)?
@nigelgbanks
Copy link
Contributor

For point 3. The files are created by the process manager s6. A file is created for each environment variable embedded in the docker image or passed in at run time.

For point 4. s6 does it as part of its startup. It's not something we control, though we do modify some environment variables in some specific cases, as the link you provided shows.

For point 5. They come from the Docker containers environment variables. These can be specified in the Dockerfile or they can be passed in when the container starts from the command line or from docker compose. The latter takes precedence.

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

2 participants