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
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ services:
dockerfile: ./docker/orthanc-raw/Dockerfile
args:
<<: *build-args-common
ORTHANC_RAW_MAXIMUM_STORAGE_SIZE: ${ORTHANC_RAW_MAXIMUM_STORAGE_SIZE}
command: /run/secrets
environment:
<<: [*pixl-db, *proxy-common, *pixl-common-env]
Expand All @@ -182,7 +183,6 @@ services:
- type: volume
source: orthanc-raw-data
target: /var/lib/orthanc/db
- ${PWD}/orthanc/orthanc-raw/config:/run/secrets:ro
networks:
- pixl-net
depends_on:
Expand Down
7 changes: 6 additions & 1 deletion docker/orthanc-raw/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,9 @@
FROM osimis/orthanc:22.9.0-full-stable
SHELL ["/bin/bash", "-o", "pipefail", "-e", "-u", "-x", "-c"]

COPY ./orthanc/orthanc-raw/plugin/pixl.py /etc/orthanc/pixl.py
ARG ORTHANC_RAW_MAXIMUM_STORAGE_SIZE

COPY ./orthanc/orthanc-raw/plugin/pixl.py /etc/orthanc/pixl.py
# Orthanc can't substitute environment veriables as integers so copy and replace before running
COPY ./orthanc/orthanc-raw/config /run/secrets
RUN sed -i "s/\${ORTHANC_RAW_MAXIMUM_STORAGE_SIZE}/${ORTHANC_RAW_MAXIMUM_STORAGE_SIZE:-0}/g" /run/secrets/orthanc.json
2 changes: 1 addition & 1 deletion orthanc/orthanc-raw/config/orthanc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

// Limit the maximum storage size
"MaximumPatientCount" : 0, // no limit
"MaximumStorageSize" : ${ORTHANC_RAW_MAXIMUM_STORAGE_SIZE}, // MB
"MaximumStorageSize" : ${ORTHANC_RAW_MAXIMUM_STORAGE_SIZE}, // MB, replaced in Dockerfile because its an integer
"MaximumStorageMode" : "Recycle",


Expand Down