data/Kirby/FontAwesomeManager
(or smth. like that) doesn't look as nice as styles/fonts/fa
, but that's just personal preference
That seems like an entirely non-issue, I don't think anyone is looking at the filepath of resources on their browser and being upset by something called
data
instead of
styles
. You can see this happening if you upload an image through one of the relevant style properties in the admin panel as well (Logo, for example I believe)
- Having the files in
data
would slightly worsen rebuild performance for everyone due to Flysystem overhead
What trigger builds to run? I'd imagine this would also be a non issue, especially in cases where flysystem is ultimately just writing to a local file which is going to be the case for the most people
Site is run of server(s) that do have persistent read-write access to styles
and data
is not accessible through an OS filesystem mount
This usecase wouldn't benefit either, in fact runtime performance might get worse if the site is not run of a full site CDN (eg. font files might get accessed through a different domain/host which requires a separate HTTP connection) and could lead to CORS issues (as already reported by some users).
This use case would absolutely benefit, on deployment processes that don't use entirely new images (as I'll get to below) and also don't use S3 we have an NFS share for
internal_data
and
data
that are linked to with a config.php edit through the native filesystem, and
data
is served directly on the load balancer rather than being passed in from one of the individual web servers, which only handle PHP requests. And if someone has their
data
mount on something that isn't correctly setup the fonts being served from there are only going to encounter the same issue as all avatars, attachment thumbnails, uploaded videos, etc.
Therefore I don't think I will change the default behaviour as it would only be beneficial for one usecase.
Though I will add an option to use a Flysystem (not necessarily data
, could be a completely new one to allow maximum flexibility) instead of the filestem at styles
.
This should do what we need, thanks!
For those who fall into usecase 3) right now and use S3 I'd either embed the fonts or
- Copy the contents of
styles/fonts/fa
to S3
- Configure a (caching) reverse proxy for
https://www.domain.tld/styles/fonts/fa
to S3
- Mount S3 to
styles/fonts/fa
via s3fs/goofys/riofs etc.
This would allow to keep the files in S3 and be compatible with the current code.
I thought about doing something along these lines as well just using the NFS share we already have for the code_cache. However, your files are being inserted directly into the default
styles/fonts/fa
directory, which doesn't work with our deploy process, and would result in XF's files being overwritten
Running on multiple nodes and keeping read-write filesystem access (which is required to be able to install/upgrades Add-ons via ZIP from ACP anyway) isn't thaaat complicated - we do that in production.
read-write filesystem access is definitely a no-go for most of our environments, many of them run on services like ECS and have no persistent filesystem except an NFS mount for the code_cache and the add-on zip uploader is disabled as everything gets deployed through a CI/CD tool.