Split Directory Structure

Last updated on
8 September 2022

(This document elaborates on the examples in the README and this comment in the issue queue.)

Do **NOT** put configuration directories inside of each other. In particular the split folder **MUST NOT** be inside of the sync directory. Recommended is a sibling, or in other words a folder that shares the same parent as the sync directory or in a folder with other split folders which is next to the sync folder.

If you want the split config to be in the sync directory then you need to use "Collection" as the storage option. This will put the split directory effectively inside of the sync storage because it uses a different kind of config storage which leverages collections.

Examples (all of these variations will work):

Flat:

../config/
├── dev
│    config.yml
│     ...
├── sync
│    config.yml
│     ...
├── test
     config.yml
      ...

Grouped splits: 

../config/
├── sync
│    config.yml
│     ...
└── splits
    ├── dev
    │    config.yml
    │     ...
    └── live
         config.yml
          ...

Multisite setup:

../config
│
└──default
│    config.yml
│     ...
│
└──multisite
│    config.yml
│     ...
│
└──splits
   │
   └──default
   │  │
   │  └──dev
   │  │    config.yml
   │  │    ...
   │  │
   │  └──prod
   │       config.yml
   │       ...
   │
   └──multisite
      │
      └──dev
      │    config.yml
      │    ...
      │
      └──prod
           config.yml
           ...

Despite seeming like a good idea, this configuration will NOT work correctly. Almost anything should work so long as you don't nest file storages within each other:

BAD:

../config/
      │    config.yml
      │    ...
      ├── dev
      │    config.yml
      │    ...
      ├── test
      │    config.yml
      │    ...


Help improve this page

Page status: No known problems

You can: