fix: force disable upload purging if read-only mode is enabled
Context
The registry has a read-only mode which allows disabling writes/deletes to the backend. This is used for maintenance purposes.
The upload purger is another maintenance feature that deletes image upload artifacts from the storage backend.
Problem
Right now the upload purger is not disabled if the registry is in read-only mode. Although the upload purger does not delete any image data (only upload artifacts), for correctness we should prevent any kind of write/delete during the read-only mode.
Solution
The upload purge is started within the app constructor and has access to the entire config, so we should be able to easily disable the upload purger (if enabled in the config) if the registry is started in read-only mode.
Edited by João Pereira