-
-
Notifications
You must be signed in to change notification settings - Fork 122
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
Fix #373: Run custom command in fpm images without running web server #413
Conversation
Thanks for putting some effort to solve this problem. I have a few things to update in the documentation (I have learned a lot since I wrote it), but one way of solving this is by setting The The changes you're proposing might have a big domino effect in other areas if I understand everything correctly. Do you have a lot of experience with S6 Overlay? I have a bit of experience with it, but there are others who are beyond experts at it 😃 |
With this changes we don't need to override the entrypoint with I've already used s6 in other projects but I'm not an expert so maybe I'm missing something. Running the image without custom command:
Running the image with a custom command:
|
That's cool to know. The only thing I am really hesitant on is the docs explicitly say you should set the entrypoint. I've worked on some issues with the founder of S6 and have been called out to "do exactly as I say", which makes sense from an OSS maintainer's perspective. I'm just really worried about unintentional side effects if we start using S6 the way it's not intended to be used. https://github.com/just-containers/s6-overlay?tab=readme-ov-file#usage Thoughts? |
I don't know if there are side effects but I've already used s6 this way in one of my docker images for laravel and it worked. I found this issue just-containers/s6-overlay#587 on s6 and he suggest to call |
I am just adding a note that I haven't forgotten about this -- I've just been slammed with other things. I really like where this is going. I am hoping to get a direction on this in the next few days to a week. I will keep you posted 👍 |
…n-running-a-non-default-command' into fix-fpm-custom-command
882c37e
into
serversideup:373-nginx-boots-up-and-starts-accepting-connections-when-running-a-non-default-command
I really like what you proposed here! I am moving this into my PR for further testing #437 Thanks a ton for bringing this up. I think it will be a great DX improvement 👍 |
…ehavior (#437) * Add custom registry support to build command * Attempted fix for just-containers/s6-overlay#586 * Preprended `fpm` to debug logs * Revert change back to SIGQUIT for best performance with graceful shutdowns with FPM * fix fpm with custom command (#413) Co-authored-by: Jay Rogers <[email protected]> * Removed undefined PHP_VARIATION warnings * Added support for running custom commands * Improved debug notice * Added deprecation notice * Revert "Removed undefined PHP_VARIATION warnings" This reverts commit fbfcc9d. * Remove undefined variable warnings --------- Co-authored-by: Fabio Capucci <[email protected]>
…ehavior (#437) * Add custom registry support to build command * Attempted fix for just-containers/s6-overlay#586 * Preprended `fpm` to debug logs * Revert change back to SIGQUIT for best performance with graceful shutdowns with FPM * fix fpm with custom command (#413) Co-authored-by: Jay Rogers <[email protected]> * Removed undefined PHP_VARIATION warnings * Added support for running custom commands * Improved debug notice * Added deprecation notice * Revert "Removed undefined PHP_VARIATION warnings" This reverts commit fbfcc9d. * Remove undefined variable warnings --------- Co-authored-by: Fabio Capucci <[email protected]>
Hi, I've the same problem as describe in #373 and I think I found a good solution to fix this problem:
docker-php-serversideup-entrypoint
as entrypoint like other images instead of/init
from s6entrypoint.d
scripts as s6 service because they are run insidedocker-php-serversideup-entrypoint
/init
as default dockerCMD
I removed the
docker-php-serversideup-s6-init
since it's not needed anymore