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

Set orthanc raw maximum storage in Dockerfile #179

Merged

Conversation

stefpiatek
Copy link
Contributor

@stefpiatek stefpiatek commented Dec 8, 2023

Wasn't sure how much time you've spent messing around with docker build arguments so dropping this in as a suggestion for how to set the limit (and hopefully allow us to start off a run this afternoon using this)

Fixes UCLH-Foundry/the-rolling-skeleton#69

@stefpiatek
Copy link
Contributor Author

stefpiatek commented Dec 11, 2023

Looks like its working, setting the maximum size to 100 Mb

docker system df --verbose --format '{{ range .Volumes }}{{ .Name }} {{ .Size }}\n{{ end }}' | grep pixl_test_orthanc

pixl_test_orthanc-raw-data 91.18MB
pixl_test_orthanc-anon-data 158.3MB

Studies which had been longest since they were received in orthanc are deleted first 🎉 I think ready for review

Copy link
Member

@milanmlft milanmlft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Stef! This was pretty much what I had in mind :)
I'll add some documentation to point out how to configure it.

@milanmlft milanmlft mentioned this pull request Dec 12, 2023
2 tasks
@milanmlft
Copy link
Member

Adding a very simple test in line with the current system tests (just checking the docker logs), but should probably be improved as part of #205

@stefpiatek stefpiatek merged commit 9363697 into milanmlft/auto-delete-images Dec 13, 2023
7 checks passed
@stefpiatek stefpiatek deleted the stef/set-orthanc-recycle-size branch December 13, 2023 09:36
milanmlft added a commit that referenced this pull request Dec 13, 2023
* Fix env variable names in `delete_oldest_n_studies.py`

These new variable names are consistent with what is set in `.env` and
`test/.env.test`

* Add MaximumStorageSize config for orthanc-raw

* MaximumStorageSize needs to be an integer

* Revert "Fix env variable names in `delete_oldest_n_studies.py`"

This reverts commit 0842f43.

* Set orthanc raw maximum storage in Dockerfile (#179)

* Set orthanc raw maximum storage in Dockerfile

* Orthanc raw defaults to no limit on storage

Saves us from faffing around with build args
for other tests

* Format README

* Document `ORTHANC_RAW_MAXIMUM_STORAGE_SIZE`

* Add simple test for `ORTHANC_RAW_MAXIMUM_STORAGE_SIZE`

---------

Co-authored-by: Milan Malfait <[email protected]>

---------

Co-authored-by: Milan Malfait <[email protected]>
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.

2 participants