Auto-restarting frankenphp in worker mode on file changes (Docker local development) #556
Unanswered
binaryfire
asked this question in
Q&A
Replies: 1 comment 5 replies
-
This is the script I use to do a few things on file changes -- but I don't use worker mode in development: #!/bin/bash
sigint_handler()
{
kill $PID
exit
}
trap sigint_handler SIGINT
while true; do
composer dump -o --apcu
twcss -i public/assets/style.css -o public/assets/web.css --minify
$@ &
PID=$!
inotifywait -e modify -e move -e create -e delete -e attrib -r "$(pwd)"
kill $PID
done This runs
will watch the current directory for changes, and restart things. I don't use a mac for development, so this likely needs some changes to support a mac, which uses a totally different filesystem/watching method. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We've just migrated from the binary to the Docker image for local Octane development and need to implement a way to reload / restart frankenphp on file changes. Could someone point me in the right direction? Using non-worker mode in local dev isn't an option for us.
From what I can see, the
frankenphp reload
command just reloads the Caddy config. Octane handles hot reloads natively when using the binary. Not sure how to get the same thing happening in the container.Beta Was this translation helpful? Give feedback.
All reactions