-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
nixos/wordpress: nginx support #84446
Conversation
a6b96bc
to
b1544e3
Compare
Nice work! I'm currently running my own patched version of wordpress on Nginx (https://github.com/c0deaddict/nur-packages/blob/master/modules/wordpress/default.nix) Your changes look much better 👍 I especially like the switch for |
Does anyone use the |
No, but if this should become a breaking change I would love to get some of #96910 in there (I can work on that if this pull request will become nginx support only but I should probably do this before it gets merged) |
Hi thanks for the interest, it's been a long time. The one thing that bothered me is how to handle the migration to theses new options. It doesn't seem possible to do it without breakage :/ |
Is it possible for them to coexist in nixpkgs, once that's done then the |
@FPtje was using this module with |
Fwiw I set this up with nginx and it "just worked"
…On Tue, Apr 13, 2021, 9:13 AM Aaron Andersen ***@***.***> wrote:
@FPtje <https://github.com/FPtje> was using this module with httpd
<#62175 (comment)> at
one point. Any input @FPtje <https://github.com/FPtje>?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#84446 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGRJXCR4SCZDSZOC77Y4VLTIOLDZANCNFSM4MCA4RTA>
.
|
When I say it will break existing configuration it's because originally the module options are:
With theses changes the interface is now:
|
@eonpatapon This would be really stupid but you could try to put the webserver option inside each site (so it would be per site). But I don't know if that's worth it and also people would probably forget to update it. But then we could default it to nginx on a specific stateVersion if we want to. |
I'm sorry, I forgot this actually left |
It should be possible to watch for additional attrs in the config and warn
that next version these will not work and will have to go in the "sites"
attr.
…On Tue, Apr 13, 2021, 9:27 PM Aaron Andersen ***@***.***> wrote:
I'm sorry, I forgot this actually left httpd support around... I thought
it replaced, not added.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#84446 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGRJXC7UA43GE5CCXXFRRLTIRBEXANCNFSM4MCA4RTA>
.
|
@expipiplus1 do you have something in mind where this has already been done ? |
I just thought a bit about my wordpress improvements PR (#96910) and I think the following change may be benefical to do in a separate commit: This would be a breaking change if somebody relies on accessing the attributes directly. But as there is a virtualHost attribute currently I think this is unlikely. Still this would need to be discussed before. Another idea would be to just fix the virtualHost attribute to work with nginx also (or add an attribute ${webserver}.virtualHost) so we could change this in the future transparently. This may be easier to get merged rather soonish than the other idea. |
The idea would be something like mohe2015@84dd0e1 What do you think? |
@eonpatapon friendly ping |
@mohe2015 do you mean importing the commit you mention in this PR ? |
Yeah but first what you think about the change (also adding the virtualHost attribute for nginx). I would like to have it to be able to change the nginx service name later (in my other PR) which may be needed but I'm not sure. I think this just hides the implementation details which also may be beneficial and makes usage a little bit better IMO |
@mohe2015 About the virtualHost attribute for nginx, I'm not sure this is a common pattern. Usually high level modules make use of low level modules and if you want to do some more configuration on the low level module you can do it directly using it's interface. For the PR I will have a look and comment there |
I would claim that changing things like enabling acme or ssl are pretty common.
I'm not sure if it would really break but I assume if: |
It would be nice to move forward on this PR which is in a pretty good shape:
@eonpatapon could you add a release note mentionning the wordpress implementation change and explaining the backward compatibility will be removed for 22.05. @mohe2015 I think the current implementation of this PR is an improvement and there is a consensus on it. So, we could move forward on it and continue to discuss on other improvements in some followups PRs.
I would then propose to wait for 1 week more (once my requested changes are applied) and if nobody complains, merge it. |
914b1d5
to
6f35f81
Compare
@nlewo thanks for the review! I've rebased and added some release notes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eonpatapon thx!
So, if nobody complains, i will merge it on Friday 16/07.
Wordpress? Me? Strange, I do not remember that. The latest thing I have relinquished was XFCE small tools. |
@AndersonTorres arf, excuse me! I actually wanted to ping @aanderse. |
@nlewo i only ever touched |
@GrahamcOfBorg test wordpress |
Thanks @eonpatapon ! |
Motivation for this change
To be able to combine worpress with other modules that are using nginx.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)