Replies: 1 comment 3 replies
-
|
This is definitely harder than it should be, but I think moby/moby#48798 is probably your best bet -- with that, you should be able to mount the WordPress image inside the Caddy container in the appropriate place (because you are correct - FPM won't serve static files by itself). |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
The docs says it's possible to deploy a FPM-based static image (updates-via-redeploy), but I'm a bit lost about how to do it.
I've managed to do a Caddy + Wordpress-FPM deploy sharing a volume (/var/www/html) between them. It works, but, as expected, it's not static (so it's harder to control its upgrades through image tag version).
If I try to go static image and don't use a volume to share WP's files with Caddy, how will it serve its static files (CSS, JS etc)? They seem to be spread among many folders (and if I create a volume for each of these folders, which would be annoying, it would also make harder to upgrade these files).
Not sharing WP's files with Caddy also makes it harder (impossible?) to configure it to send the correct requests to FPM to run the corresponding PHP files.
I'm using Caddy, but I think the same problems would happen with other web servers.
Any tips about all that?
Thanks for your attention!
PS: The default Caddy config for PHP decides what to do based on file existence. Without sharing a volume that won't work. I came up with this Caddy config that seems to handle some routes, but probably missing many others. Still, the static files serving problem remains and I have no idea how to reasonably solve it.
Beta Was this translation helpful? Give feedback.
All reactions