Maintenance¶
This section covers the periodic tasks required to ensure the system remains healthy and performs optimally.
These tasks include :
Enabling maintenance mode when necessary
Cleaning up attachments
Clearing caches
Regular execution of these actions helps maintain system stability, performance, and data integrity.
Maintenance mode¶
If you want to block access to your application while you are performing maintenance tasks, you can activate the maintenance mode. This will display a message to users indicating that the application is temporarily unavailable.
sudo geotrek maintenance_mode on # activate maintenance mode
sudo geotrek maintenance_mode off # deactivate maintenance mode
docker compose run --rm web ./manage.py maintenance_mode on # activate maintenance mode
docker compose run --rm web ./manage.py maintenance_mode off # deactivate maintenance mode
PostgreSQL optimization¶
Increase
shared_buffersandwork_memaccording to your RAMUse pg activity for monitoring
Access your database securely on your local machine (QGIS)¶
Instead of opening your database to the world (by opening the 5432 port for example), you can use SSH tunnels. Follow this tutorial for more information (in french).
Manage Cache¶
You can purge application cache :
with command line :
sudo geotrek clearcache
docker compose run --rm web ./manage.py clearcache
in Geotrek-admin interface :
https://<server_url>/admin/clearcache/