-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
refactor frontend with routing because we need more api routes f… #32
refactor frontend with routing because we need more api routes f… #32
Conversation
…or the file manipulation feature. - inject mod rewrite to webserver condig - moved function, config and classes to private directory - new try for timezone issue. writing it to config because lighttpd dosent hand over env vars to php - Dockerfile needed change for new dirs
FYI: you can use lighttpd mod_setenv to set variables in lighttpd that are propagated to a FastCGI backend. I have not checked if PHP will honor something like TZ sent per-request, which is after the PHP has started up. |
…needing a database or similar. It's kind of a small hack, but I think it should work.
…ng and renaming files and provides feedback to the user.
update from upstream
update with new commits
Ignore the "checks failed" for now. Seems the PRs are building now, but some permission issues when pushing images from forks to my gh packages. Will try to fix this in the coming days... |
Thanks for the tip. We should take a closer look at this for the future. Currently, I have a solution (writing to the config.php, like with the other variables). |
A quick update from my side. I won't be able to finish everything this week. I'll make sure the branch is ready next week. |
Thank you for all the efforts! There is really no rush on this. |
…a php. lets wait and integrate the new python files and check if we can change it back
This looks really good to me! I left some comments, mostly minor or wishes. Not that I can judge any of the web things, will have to try it. Not sure why the build does not work. Shall we merge this into the new development branch, then the :development container should be available for live testing. I think this should also not clash (much) with the python rewrite in #48. Should be fairly easy integration, as the interface remain the same brother scripts. Only the status handling, we will likely need to find a common way. But this should also be easier with python. Can you check file existance or contents for status, rather than checking for running process? This would likely be easiest... |
Also, if lighttpd.conf is configured to start the FastCGI backend, lighttpd can be configured to set TZ before starting the PHP and that will definitely work. See lighttpd.conf |
Yes, let's merge it into the development branch, along with Pull Request #48. Then we'll try to make the necessary adjustments. |
@vgarcia007 : Since this is a PR directly from your repo, could you do the conflict resolution, please? Probably doesn't help much, if I start it now, as I can't push it to your branch. It should be fairly trivial |
The conflicts are resolved, but it's not ready to merge yet. I still need to update the PHP code that triggers the scripts. It now has to trigger the new Python scripts instead of the previous .sh scripts. Testing this will take some time... |
It's now ready to merge and is functioning as expected. The only issue is retrieving the 'Waiting Status' via the API, which was anticipated. Addressing this will require developing a new approach to export this status from the Python script. |
Replaced bash calls in PHP scripts with Python.
Excellent, thank you!! I will merge this in (still not sure why the build on this PR fails, but lets check if it works in branch). We can then use #60 to fix the status. |
Problem:
The current frontend architecture is becoming difficult to manage, particularly as more API routes are needed for the file manipulation feature #27 . Without proper routing, the system will become increasingly unmanageable.
Solution:
Implement Frontend Routing:
Refactor the frontend to introduce routing mechanisms, which will help organize and streamline the handling of multiple API routes, especially for the file manipulation feature. This ensures scalability and clarity in the codebase.
Server Configuration Update:
Inject mod_rewrite into the web server configuration (Lighttpd) to handle clean URLs and route requests properly.
File Structure Reorganization:
Move sensitive files (functions, config, and classes) to a private directory outside of the document root. This prevents direct access via the browser.
Timezone Issue Fix Wrong Timezone in php #26 :
Since Lighttpd does not pass environment variables to PHP, the timezone must now be manually set in the configuration file. Update the config.php to include the correct timezone settings to ensure consistency across the application. (this is done via the startup shell script)
Dockerfile Update:
Modify the Dockerfile to accommodate the changes in the directory structure. The new directories (like the private directory) should be reflected in the container's build process to ensure everything is properly mapped and accessible inside the container.
Next Steps: