Skip to content

FrankenPHP worker watch should explicitly watch "/app" to ensure reliable hot reload on Docker Desktop (Windows) #898

Description

@romain2518

Description

Hello,

I noticed that the default compose.override.yaml configuration uses:

environment:
  FRANKENPHP_WORKER_CONFIG: watch

However, this appears to be unreliable on Docker Desktop (Windows). Explicitly specifying the watched directory fixes the issue completely:

environment:
  FRANKENPHP_WORKER_CONFIG: "watch /app"

Environment

symfony-docker: latest version
OS: Windows 10
Docker Desktop: 4.59

Observed behavior

With the default config (watch):

PHP and Twig code changes are not detected

Changes are only applied:

  • After restarting the container,
  • After triggering a 500 error,

With explicit path (watch /app):

environment:
 FRANKENPHP_WORKER_CONFIG: "watch /app"
  • Changes are detected immediately
  • Hot reload works reliably

Additional notes

This change fully resolved the issue in my environment and does not appear to have any negative side effects.

Thanks for maintaining this excellent project!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions