-
-
Notifications
You must be signed in to change notification settings - Fork 798
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
feat: activate the watch mode in dev #717
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
worker { | ||
file ./public/index.php | ||
env APP_RUNTIME Runtime\FrankenPhpSymfony\Runtime | ||
watch | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
frankenphp is already running in
watch
mode for dev, if you add the worker for dev (which I think should be in your ownDockerfile
, not the one in this repo) it shouldn't run in watch mode hereThere 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.
Hey @deluxetom thx for commenting
I am very new to both caddy and frankenphp
What you mean is that the actual code already watch new code for exemple a php class inside src or a js file inside asset folder ?
Does this PR is useless then ?
thx
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.
I dont think its useless but I think what you're trying to do it out of scope of this repository.
Worker mode isn't meant to be used for development, and watch mode isn't supposed to be used on prod.
What you might want to do is to fork this repository and change the Dockerfile for your own application. This is what I ended up doing on my end.
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.
@deluxetom is right: the Dockerfile in the symfony-docker project already manages the watch and worker modes.
The Dockerfile builds the project with 3 targets:
--watch
argument to thefrankenphp
command--watch
argument is not used) and which downloads dependencies and enables theworker
mode through the lineENV FRANKENPHP_CONFIG="import worker.Caddyfile"
(this environment variable is read by the main Caddyfile; theworker.Caddyfile
enables the worker mode)It is well designed by default, but it can be forked and adapted as you prefer as @deluxetom said
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.
oki thx both of you with all your comments
of course after using this repo as base I've tweaked some file and perhaps missed something regarding such watch logic as when testing as I had to rebuild to have y code available
will double check this specifically
in the meantime lets close here if it wont bring value as it should be already the case
thx again !