-
-
Notifications
You must be signed in to change notification settings - Fork 415
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
[💡FEATURE REQUEST]: Allow merging two config files #935
Comments
FYI, we implemented this feature in RR 1 itself. Not via Viper. |
The ticket in the |
I would like having an But I would also like to be able to have very different logging configurations in each environment and this can be cumbersome with the |
@hugochinchilla Yeah, I agree to include |
@rustatian Hello! "Allow merging config files" will come in |
Hey @embargo2710 👋🏻 But, to say in truth, I might implement this without waiting for the |
What about include feature? I want this) |
Hey @zolotov88 👋🏻 |
Where I can find your discord? |
@rustatian Thank you! |
@rustatian Maybe there is still a time in the next release for this task? |
@Kaspiman I guess this is fairly easy to implement:
As for the p.2 and temporary instances: I don't know if that possible to add configurations to the single instance (as far as I know - no). |
This feature will be in the next release under the |
Maybe I'm late, but based on a rich experience working with complex
|
Hey @speller 👋
|
Guys, while the issue is closed, but the discussion is not locked, feel free to send your feedback here or on our Discord server [RR channel]. |
@rustatian Unfortunately, it doesn't work as expected for me. This is why I've wrote down my expectation in the details. My use case as an example: I have a "production" rr.yaml file, then, in the dev move, I want to override/add/change something without duplicationg the code. I try the following command:
With the following dev config: version: '3.8'
server:
env:
- XDEBUG_TRIGGER: 1 And I get the following error:
So the extension or merging of config doesn't work as the majority of users who have experience working with docker compose yaml configs and with Symfony yaml configs will expect. Here I want to add just a single environment variable and it breaks the whole config making RR not working at all. Also, I would expect passing multiple config files either this way:
or
without unintuitive workarounds with Please treat it as feedback, not as blame. |
Additionally, I would expect a way to control the resulting configuration after merging - a dump function, or printing it to the console output on startup, or anything else. To see what RR got after its internal processing and is it what I intended to have. |
Hey @speller 👋
Sure 😃 What is in your |
@rustatian It's a very common PHP section from samples or documentation: server:
command: "php index.php"
env:
- APP_RUNTIME: Baldinof\RoadRunnerBundle\Runtime\Runtime |
@speller, Yeah, only |
Closed mistakenly. It should be open until the experiment is finished. |
In roadrunner 1.x we could have two different config files, one for production and other for develpment.
An example development config file looked like this:
Now the include block is not handled as
spf13/viper
does not have this feature implemented, (but is requested spf13/viper#893).As a workaround for this problem I can suggest two solutions:
--config
multiple times on the command line and merge the configuration from multiple files.enabled
under reload, so I can call the server with-o reload.enabled=false
in production.The text was updated successfully, but these errors were encountered: