Skip to content
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

Split media and static folders #340

Merged
merged 2 commits into from
Jan 19, 2024

Conversation

Xpirix
Copy link
Collaborator

@Xpirix Xpirix commented Jan 8, 2024

  • This PR will prevent deleting files from media folders (cache, geopackages, models, packages, styles, wavefronts) when running python manage.py collectstatic --clear.

This is also for:

Changes summary

  • Use differents volumes for media and static in docker-compose for dev environment
  • Add a command to collectstatic and delete folders from media that exist in static

Requirements on the server-side

  • Update the docker-compose.yml for rancher to keep the current volume for media and use a different volume for static. For example:
volumes:
    - django-statics-data:/home/web/static:rw
    - the_current_volume:/home/web/media:rw

It's better to update this file in the code to match the configuration on rancher (confirmation needed)

  • Restart the rancher server and run python manage.py collecstatic to generate the static folders inside django-statics-data
  • (Optional) After making sure that everything is okay, we can delete all static folders inside the_current_volume by running cleanmediafolder

@Xpirix Xpirix requested a review from dimasciput January 8, 2024 10:47
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a9dabb5) 36.97% compared to head (a36953e) 82.75%.
Report is 1 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           master     #340       +/-   ##
===========================================
+ Coverage   36.97%   82.75%   +45.77%     
===========================================
  Files         106      142       +36     
  Lines        4500     5497      +997     
===========================================
+ Hits         1664     4549     +2885     
+ Misses       2836      948     -1888     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dimasciput dimasciput merged commit 6d03c84 into qgis:master Jan 19, 2024
2 checks passed
@Xpirix Xpirix deleted the split_media_and_static_folders branch January 22, 2024 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants