-
Notifications
You must be signed in to change notification settings - Fork 1.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
Remove redis-cache volume #1555
Conversation
I hope this comment isn't too spammy - I just wanted to thank you for trying to improve on this and also to the others who posted solutions. I think you'll save many people a lot of frustration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change looks fine in principle.
I'd let someone with better knowledge of frappe_docker merge it though.
* Remove redis-cache volume * remove from docs * ci: fix pre-commit --------- Co-authored-by: Revant Nandgaonkar <[email protected]>
* Update custom-apps.md grammar fixes * Remove redis-cache volume (#1555) * Remove redis-cache volume * remove from docs * ci: fix pre-commit --------- Co-authored-by: Revant Nandgaonkar <[email protected]> --------- Co-authored-by: Salah Aldin Fateh <[email protected]> Co-authored-by: Revant Nandgaonkar <[email protected]>
How did you handle volume removal? It seems like you deleted the sites volume |
I did docker-compose down -v python3 ./easy-install.py deploy |
Fixed with just launching default script image then changed to my own (learning_prod_setup-compose.yml) |
Details of the Change:
This pull request addresses an issue where the assets.json file, now stored in Redis by Frappe, persists across new image builds due to the Redis cache volume being persistent. This prevents updates to assets.json from being reflected after a new build.
The proposed change removes the persistent volume for redis-cache, ensuring that the cache, including assets.json, is cleared during each new image deployment.
Problem Solved:
By removing the persistent Redis volume, we prevent outdated assets.json data from being retained, ensuring the application always works with the latest assets after a build. This eliminates the need for manual intervention or additional automation to clear the cache.
Retaining the old assets.json file will cause the websites to miss certain assets:
Why is This Necessary?
Without this change, developers or pipelines must manually clear the assets.json value from Redis or automate the process using additional scripts or hooks. Removing the persistent volume simplifies the process and avoids potential misconfigurations.
This PR was inspired by @ankush's comment on the issue frappe/frappe#29901 , as he correctly pointed out that there is no need to persist in this volume.