docs: migrate.md adjust volume mount path#2337
docs: migrate.md adjust volume mount path#2337francislavoie wants to merge 3 commits intophp:mainfrom
migrate.md adjust volume mount path#2337Conversation
Signed-off-by: Francis Lavoie <lavofr@gmail.com>
|
Oh, great catch, but the image defaults to /app. We'll need to adjust all other occurrences instead :/ |
The FrankenPHP Docker image defaults to /app, so update all Caddyfile examples to use /app/public instead of /var/www/app/public. The "Before" (Nginx/PHP-FPM) examples retain /var/www/app as that reflects a typical legacy setup. Ref: php#2337 https://claude.ai/code/session_01DE6NMaJLcHC5nnQNwwAmCc
|
Meh, Claude isn't getting it right. I'll just do it... |
henderkes
left a comment
There was a problem hiding this comment.
The default path isn't /var/www/app for the nginx image either, so it's fine just overwriting the config for our example like we do in the nginx one.
docs/migrate.md
Outdated
| volumes: | ||
| - .:/app/public | ||
| - .:/var/www/app | ||
| - ./Caddyfile:/etc/frankenphp/Caddyfile |
There was a problem hiding this comment.
Generally we recommend mounting a directory rather than a file because certain methods of editing files don't correctly get followed by a bind mount (if the inode swaps or w/e, I think).
So it should be more like this:
| - ./Caddyfile:/etc/frankenphp/Caddyfile | |
| - ./config:/etc/frankenphp |
Where the Caddyfile is at ./config/Caddyfile.
Also this lets users have more config files that get imported in chunks.
Covered here https://caddyserver.com/docs/running#docker-compose
There was a problem hiding this comment.
The reason why I added this is for parity with the nginx example above, so when the nginx example mounts in the single file, the frankenphp example should, too. Or we change it for both. This is really for a minimal configuration where multiple files aren't needed (typically the app-level Caddyfile is meant to run standalone, isolated, anyhow).
There was a problem hiding this comment.
I get that, but it's a well-known footgun where if you edit the Caddyfile with vim then try to reload it will not work if you mounted it this way. (Works fine if you used nano, it saves the file with the same inode)
There was a problem hiding this comment.
Let's change it for both then.
The rest of the examples use
/var/www/app, so the volume mount should match.