-
Notifications
You must be signed in to change notification settings - Fork 1
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
Manage storage size on orthanc-raw
#176
Changes from all commits
0842f43
9e11816
1cdf7f0
55972d5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,11 @@ | |
// doubling them, or replaced by forward slashes "/". | ||
"StorageDirectory" : "/var/lib/orthanc/db", | ||
|
||
// Limit the maximum number of instances | ||
"MaximumPatientCount": 20000, | ||
// Limit the maximum storage size | ||
"MaximumPatientCount" : 0, // no limit | ||
"MaximumStorageSize" : ${ORTHANC_RAW_MAXIMUM_STORAGE_SIZE}, // MB | ||
"MaximumStorageMode" : "Recycle", | ||
Comment on lines
+13
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎉 Yeah this seems like a good shout. Worth testing on a dev version on the GAE. Which also reminds me that we need to document how we create a shared instance on the GAE when we make them I'll make a PR based on step 1 of https://github.com/UCLH-DHCT/emap/edit/main/docs/core.md |
||
|
||
|
||
// Path to the directory that holds the SQLite index (if unset, the | ||
// value of StorageDirectory is used). This index could be stored on | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,7 @@ ORTHANC_RAW_USERNAME=orthanc_raw_username | |
ORTHANC_RAW_PASSWORD=orthanc_raw_password | ||
ORTHANC_RAW_AE_TITLE=ORTHANCRAW | ||
ORTHANC_AUTOROUTE_RAW_TO_ANON=true | ||
ORTHANC_RAW_MAXIMUM_STORAGE_SIZE=1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we want this to be limited during testing? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think having a low value makes testing easier as we won't need a huge amount of images to see if it's actually working. Note that this is just the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah yeah I guess if this is used in end to end tests then that might be an issue was my thought, but maybe it's not used in e2e tests in CI? |
||
|
||
# PIXL Orthanc anon instance | ||
ORTHANC_ANON_USERNAME=orthanc_anon_username | ||
|
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.
Turns out this doesn't work and results in an error
ERROR: Unable to parse Json file '/run/secrets/orthanc.json'; check syntax
, with theorthanc-raw
service not even starting.Using
in turn leads to the
MaximumStorageSize
parameter being ignored, because of aBad parameter type
error, as it needs to be an integer...I've tried a couple of different things but it seems it's not possible get an environment variable read in as an integer in
orthanc.json
🙁@stefpiatek, @t-young31 any ideas?
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.
😞
no good ones. could: (a) hardcode, (b) copy the config file into the image and
sed
from a build argument. I don't suppose it works if you remove the quotes?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.
Yeah I would have thought having the env variable without the quotes would work, sad if it doesn't. Agreed on using sed to replace inline if not, perhaps wrapping the variable usage with something that will make that replacement unique