-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web deployment with static content #21845
Comments
Further clarification, command line to execute gitea: |
After doing some searching, I believe that this is related to #18110 |
Are you sure that the JS you're using matches the version of gitea correctly? Since my issue was having stale extracts and it not matching what the frontend was actually looking for. |
In my case, yes as I directly copied the public folder into my www-ssl directory (renamed, of course). |
You are doing something wrong, unrelated to 18110 Please follow the guideline strictly, for example: the document https://docs.gitea.io/en-us/install-from-source/ has told you You may need |
As per my description: adding |
I can not understand why "bindata" is not desired ( If you want to play with For a quick and stable solution: just use |
Another choice is that you still build Gitea with
|
Primary issue is that the current server is a VPS with limited memory and CPU resources. It is shared between 3 total developers and has very low code velocity. I would prefer for static assets to be served directly by apache and not proxied through an additional application - this will allow cloudflare to properly cache them while continuing to forward dynamic content through to the application. I am running many other services on the same web server - all using FCGI for HTTP/2 and as a result apache has a 512MB/instance overhead so I am limited to the total number of apache instances that I can support (3). An instance that is being used to forward a request for what amounts to a static file is an instance that could have been put to better use generating dynamic content. To get around the 500 error, I did to a build with bindata to prove out the issue - again not desired. There was no setting of |
I see, if you want to save memory heavily, you should look into the ps: I proposed a PR to fix the document: #21853 |
At the moment, there are 3 kinds of bindata assets:
When Gitea is running, only 1 can be put in other servers (to be served by other HTTP sites) 2 & 3 are necessary for Gitea, either bundle them into Gitea binary, or put them in Gitea's working directory (IIRC some documents about customizing may have mentioned that) |
Ok. Thanks for the PR and clarification there. At this point not nearly that important but; it would be nice to know what content can be put at Further note - this is for reference only, perhaps someone in the future will find this helpful: |
I think they are the JS/CSS files (under the
Do you mean it could be documented, or be changed in source code? ps: I do not use STATIC_URL_PREFIX nor PAM 😂, if you could help to improve the document and code, I can help to review and approve. Or you can tell me how to improve the document and code, then I will propose PRs. |
So.. About that
It's getting a bit late here in Central US and I have to get up early for work tomorrow. I'll fork and put together a PR to try and improve some of that documentation around PAM - give me a few days. Can't help on the Footnotes
|
Not sure whehter I understand your question correctly, the logic is like this:
|
Very interesting. So, now that I have the server, the behavior is working as expected. It was an issue when I did not have the server configured - a bit of a chicken-and-egg thing in that I couldn't set up the server (pop-up dialog A-la linked issue). Now that the server has been configured and database initialized, the site works as expected. And it was specifically having issues with |
Changes proposed in [referenced issue 21845](go-gitea#21845)
## Changes proposed in [referenced issue 21845][1] - Expand PAM configuration description with working examples. - Clarify `STATIC_URL_PREFIX` use (include "assets" and only works after database has been initialized) - Add note for HTTPS proxy support VIA Apache. [1]: #21845
## Changes proposed in [referenced issue 21845][1] - Expand PAM configuration description with working examples. - Clarify `STATIC_URL_PREFIX` use (include "assets" and only works after database has been initialized) - Add note for HTTPS proxy support VIA Apache. [1]: go-gitea#21845
Description
Hello. I need some clarification.
I've built my own version of gitea for Debian 11 (bullseye) including PAM and excluding the built-ins. I'm currently running a local instance of APACHE 2 with appropriate mod_proxy and mod_proxy_http. I am able to confirm that apache is correctly passing requests to gitea. However, all requests are resulting in a 500 internal server error. Even when manually running gitea with the --verbose option there is very little information to go on as shown below (redacting some potentially sensitive information):
I have copied the contents of ${BUILD_DIR}/"public" to /var/www-ssl/git-static, based on this documentation and the resulting gitea executable to /usr/local/bin. I have also set up an appropriate account to run under and systemd startup script based on these instructions.
My current app.ini:
If I run the application in the build directory it executes fine. However, the build directory resides on a dedicated build server and the build environment is purposefully not available on the production server (both the build system and the production server are running identically patched versions of Debian 11 - only that the production server does not have the ability to compile software for security reasons).
I desire to avoid building in the static content as this server has a heavy load and is somewhat stretched for resources as it is. PAM authentication is required as I have already implemented a system-wide user database and do not desire to maintain a separate authentication system.
Gitea Version
1.17.3 built with GNU Make 4.3, go1.19.1 : pam
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
Logs inline
Screenshots
-N/A- see logs
Git Version
2.30.2
Operating System
Linux xxxxxx 5.10.0-19-amd64 #1 SMP Debian 5.10.149-2 (2022-10-21) x86_64 GNU/Linux
How are you running Gitea?
See description.
Database
MySQL
The text was updated successfully, but these errors were encountered: