FS#70301 - [gitea] Provide split package with static files
Attached to Project:
Community Packages
Opened by Blair Bonnett (bcb) - Monday, 05 April 2021, 14:55 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:08 GMT
Opened by Blair Bonnett (bcb) - Monday, 05 April 2021, 14:55 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:08 GMT
|
Details
As per
https://docs.gitea.io/en-us/reverse-proxies/#nginx-and-serve-static-resources-directly
the static files can be served directly through nginx
instead of the gitea binary. The `make frontend` target
places them in public/ and since the `make` call in the
PKGBUILD includes this target the files are already
available. All that is required is to package them.
I've attached an updated PKGBUILD plus a diff from the current trunk version. This uses a split package to give both `gitea` (same content as currently) and `gitea-static` (the static resources, stored under /usr/share/gitea/static). I figured a split package meant users who want to use only the binary don't end up with static files they don't use. I've tested this on my server as per the instructions in the docs (set STATIC_URL_PREFIX and configure nginx to serve this prefix from the static dir). Note that https://docs.gitea.io/en-us/install-from-source/#build says "It is possible to serve the static assets directly via a reverse proxy, but in most cases it is not necessary, and assets should still be bundled in the binary". As a proof of concept I have built a version of the binary without bindata and it appears to work on my server. I guess supporting this would probably result in a third package (gitea-nobindata or something like that). Since the space saving is only 23MiB and the official docs say not to do this, I don't think it is something we need to worry about. |
This task depends upon
Closed by Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:08 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/gitea/issues/1
Saturday, 25 November 2023, 20:08 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/gitea/issues/1
In any case it increases the response time and the performance.
The binary still works the same for regular users but allows users to let the webserver handle static data.