-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add a nginx-unit -based image #1610
base: master
Are you sure you want to change the base?
Conversation
89ccc3e
to
263e0d8
Compare
Pushed another version of this to do some more testing myself, also pushed a version as |
Continued work on things, it should now mostly match cache headers for nginx/apache as well. I wasn't able to get the It's supposed to support setting cache control using an inline template like this, but any attempts to include inline templates like they describe cause unit to fail to load the configuration. "response_headers": {
"Cache-Control": "public, max-age=15778463, `${ arg_v ? 'immutable' : '' }`"
} |
generate-stackbrew-library.sh needs an update too to include it in the library file. Once this is done, a test similar to nextcloud-apache-run can be added. |
The main thing that makes me nervous here is the reimplementation of the I started fiddling with how I might implement this in the WordPress image, and I came up with something like this: RUN set -eux; \
sed -e 's/docker-entrypoint/unit-entrypoint/g' /usr/local/bin/docker-entrypoint.sh > /usr/local/bin/unit-entrypoint.sh; \
grep -F '/unit-entrypoint.d/' /usr/local/bin/unit-entrypoint.sh; \
chmod +x /usr/local/bin/unit-entrypoint.sh
COPY wordpress-unit.json /unit-entrypoint.d/wordpress.json This allows me to invoke I also don't know whether the |
@tianon When I did the first version of this, it wasn't at all possible to use the original unit entrypoint script due to how it was set up, but I should be able to retool to let it do the configuration through there now. The control argument is only necessary if you want to keep exposing the control socket, to be able to dynamically reconfigure unit while it's running, something which nextcloud lacks any functionality for. |
Ah, I see -- in case you're curious, I finished up my WordPress PoC and pushed it to docker-library/wordpress#875 😅 |
Retooled the nginx-unit image to use the upstream entrypoint, not sure about any |
Signed-off-by: Alexander Olofsson <ace@haxalot.com>
Rebased the branch, added in an IP forward config block, and built new image tags for 27, 28, and 29 for testing. |
Thanks for keeping this up to date. I just haven't merged it yet because I'm also following the progress in docker-library/wordpress#875. |
This sets up a new variant for nginx-unit, based on their nginx-unit PHP image and the Nextcloud example in their documentation.
Probably related to #1063 - though ths solution is different than the one suggested there as nginx-unit already includes a FastCGI-based PHP solution.
Images for testing have been built at
ananace/nextcloud-unit
- only x86_64 and aarch64 as that's what's available in the upstream unit image.