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

Configuration files in non-standard content directory ignored #581

Open
mikeselander opened this issue Sep 15, 2018 · 1 comment
Open

Configuration files in non-standard content directory ignored #581

mikeselander opened this issue Sep 15, 2018 · 1 comment

Comments

@mikeselander
Copy link
Contributor

When using a non-standard content directory, Chassis configuration files in said directories are not parsed, and the configuration files are only evaluated against the default content folder.

Consider the following project setup (common hm-base type setup):

 - /chassis (Everything Chassis)
   - config.local.yaml (Basic overrides (see full file below)
 - /content (Actual used content directory)
   - config.local.yaml (Installation-specific overrides)
 - /wordpress (WordPress used on platform)

and the following paths:

paths:
  base: ..
  content: content
  wp: wordpress

If one were to run an installation with the above configuration files, the /content/config.local.yaml would get ignored. It's only after adding a /chassis/content directory and adding the config file to that directory that the customizations would take effect.

I would expect that Chassis would take a look at chassis/config.local.yaml (since this should always be in the same place, it seems, and if there is a custom content path set, load the custom content directory configuration files as opposed to the default Chassis one.

  1. What operating system do you use?
    Mas OS X 10.13.6

  2. What version of Vagrant are you running?
    2.1.5

  3. Are you using VirtualBox or VMWare and which version are you using?
    Virtualbox 5.2.18

  4. Do you have a custom YAML file? If so, what does it contain?

# Establish our custom paths for local.
paths:
  base: ..
  content: content
  wp: wordpress

# Default domain to known.
hosts:
  - client.local

# Define database prefix, since we have tests as well.
database:
  name: wordpress
  user: wordpress
  password: vagrantpassword
  prefix: wp_

# Install a list of Chassis extensions automatically.
extensions:
  - Chassis/Cavalcade
  - Chassis/Debugging
  - Chassis/Memcache
  - Chassis/SequelPro
  - Chassis/Tester
  - Chassis/Xdebug

# PHP version.
php: 7.0

# Setup a predictable administrator to begin with.
admin:
  user: clientdev
  email: admin@example.com
  password: password

# Default our theme activated and turned on.
themes:
  - client
  1. Do you have any Chassis extensions installed? If so, what are they?
    See above
@rmccue
Copy link
Contributor

rmccue commented Sep 16, 2018

There’s a few reasons we don’t do this right now:

  1. It would require essentially a two pass configuration parsing, as we would need to read and combine the default files first, then if a custom content dir is set, reparse using the first config parse.
  2. The paths directive itself would need to be special-cased, as it can only really be set in the main directory. This is likely tough to explain in the documentation.
  3. This would require further trickery inside the VM for parsing configuration, because we’d now have multiple places to look.
  4. The behaviour would presumably be weird if you also had a config file in the default content directory.

None of these are unsolvable, but they’re tough to solve in a consistent and explainable way.

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