[ FEATURE REQUEST]: Support optional configuration files in include
Plugin
Config
I have an idea!
Problem
RoadRunner supports merging multiple configuration files using the include section:
include:
- .rr.local.yamlHowever, all included files are currently required. If .rr.local.yaml does not exist, RoadRunner fails to start:
handle_serve_command: config_plugin_init: open .rr.local.yaml: no such file or directory
This makes it difficult to use local configuration overrides.
A common project structure is:
.rr.yaml # Base configuration committed to Git .rr.local.yaml # Optional developer-specific configuration ignored by Git
The base configuration should work without requiring every developer, CI environment, or production deployment to create an empty .rr.local.yaml file.
Proposed solution
Support an extended include syntax with an optional flag:
include:
- file: .rr.local.yaml
optional: trueWhen optional is true:
If the file exists, RoadRunner loads and merges it normally. If the file does not exist, RoadRunner skips it without failing. Other errors, such as invalid YAML or insufficient permissions, should still produce an error.
Required includes could use:
include:
- file: .rr.common.yaml
optional: false
The existing scalar syntax should remain supported for backward compatibility:
include:
- .rr.common.yamlIt could be treated as equivalent to:
include:
- file: .rr.common.yaml
optional: false
Example version: "3"
include:
- file: .rr.common.yaml
- file: .rr.local.yaml
optional: trueThis would provide native support for developer-specific configuration overrides without requiring wrapper scripts, Makefiles, Docker entrypoints, or placeholder files.
Source: roadrunner-server/roadrunner