php - How can I compile LaTeX from a front-end website?

As Overleaf is not lightweight enough to handle LaTeX compiling as a self-hosted service on a Raspberry Pi 4 (ARMv7, 4GB RAM), I'd like to create a small front-end website from which I can:
- Retrieve LaTeX sources from a git hosted on my RPi;
- Compile them into a PDF that will be served on my page.
I'm thinking about running the script with PHP (through AJAX), passing options thanks to a small config file within the git project (like BibTeX compiling and multiple compiling to render Tikz and the TOCs).
I think it's feasible, but maybe it's not the best technology to do so (is Node.js more suited?).
There is also the problem about user rights: should the script be run by thewww-data
user? or by a dedicated user (it may requiresudo
)?
Any help is appreciated. :-)
I'm not sure SO is suited for this kind of open question, but I'm not aware of any other platform to ask this to.
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: illuminate\http\exceptions\posttoolargeexception
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.