-
Notifications
You must be signed in to change notification settings - Fork 252
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
[drupal] plan overwrites immutable to get custom config under supervision #583
Comments
Yes. Normally you would not want to modify the pkg's config file but instead you want to |
I'm not a fan of the pattern we see here at all so I'm going to mark it as a bug. Theres too much room for failure trying to manage a second service in a run hook of another. I've seen this in a few places now but am not ready to provide a proper solution just yet. Way back in November of 2015 this popped up and the solution was to create a second package which binds to the first. You can see that in the relationship between builder-api and builder-api-proxy. At the time we also tossed around the idea that a package may not be a 1:1 mapping but I'm not confident that we should make such a large change there either as well. Another way out of this could be to create a third package which includes both the app and the proxy and then simply manages both of those services in it's own hooks like we are seeing in the drupal hook linked above. If we like this pattern, we could document it and make it more of a first class citizen. |
What about a third way? My idea was to effectively use the existing core/nginx as a template. I would "fork" it and put the Drupal code and config into this new fork. This fork could then be bound to a PHP-FPM service. |
@therealpadams I think that's essentially what we're doing in builder-api-proxy without forking the compilation process. Just by passing a config with the filepaths overridden to the NGINX binary you get the isolation you need. Was there something additional you had in mind? |
I don't think so... sounds about right. But I would need to check that out first. |
In case anyone is interested, my new approach to Drupal (as I described above) can now be found here: https://github.com/therealpadams/habitat-plans
This is a total experiment to see what this solution looks like. I'm not advocating folks use this over the current |
Wanted to bump this conversation to remind folks that I am still on this:
After that, I will want to look into how to bring MySQL into the mix. But, for now, I simply want to create a simple core/drupal that can be relied on to not be so dumb as the current one. |
This seems dangerous: https://github.com/habitat-sh/core-plans/blob/master/drupal/hooks/init#L28
Can a better way be provided to launch nginx as a service with an entirely custom config file? Maybe via an optional config that a custom
run
hook looks for?The text was updated successfully, but these errors were encountered: