cevi / qualifikation

Erstelle und Verwalte J+S-Kurs-Qualifikationen online
https://quali.cevi.tools/
MIT License
5 stars 0 forks source link

Host on Cevi.Tools Cluster #18

Closed wp99cp closed 9 months ago

wp99cp commented 1 year ago

This PR includes the necessary changes to host the application on our Cevi.Tools cluster

Open Todos

jeromesigg commented 1 year ago

Icons: URL added to Font-Awesome Kit

wp99cp commented 1 year ago

This is the solution to the mail verification problem: https://stackoverflow.com/a/73215178/13371311

The root of the problem is that our Laravel applications run behind a reverse proxy. However this raises a new problem, if you run the containers locally, we have no a problem with mixed HTTPS and HTTP requests. Nevermind, just set APP_ENV=local instead of APP_ENV=production and everything works on localhost.

jeromesigg commented 1 year ago

Check every functionality:

wp99cp commented 1 year ago
  • [ ] Show file on comment: File is not showing

Yes, that's correct. For the new hosting, I've split the PHP processor (PHP FPM) and the web hosting (nginx), see https://blog.devsense.com/2019/php-nginx-docker. The file get uploaded correctly and are saved inside the PHP processor container. However, they are not exposed to the nginx web server.

Does the application create any other local files? Are any directories that must be persistent across reboots of the docker container? What is the storage directory? Are there any files saved that cannot be restored automatically after reboot?

What about the upload folder? Is this used anywhere? Some old files are stored there (also in the GitRepo): https://github.com/cevi/qualifikation/blob/master/public/uploads/event_participation_export_1586091291-5664.csv?

jeromesigg commented 1 year ago
  • [ ] Show file on comment: File is not showing

All files uploaded (avatar if not from Cevi-DB, files from posts) are stored in the images/{camp_name}/ folder, with this it is possible to delete the folder once the camp is finished. No files from the users are stored in the storage directory and also in the upload directory (old directory)

jeromesigg commented 1 year ago

Files from posts are now stored in storage/app/files/{camp} folder and all avatar-images in storage/app/public/{camp}/profiles. Images have an UID as prefix. Files are accessed through a download url with a UID of the post, and only if the user is a leader the file is downloaded.