Skip to content

Commit

Permalink
BAH-3528 | Add. uploaded-files Sub Directory And Set Permissions (#184)
Browse files Browse the repository at this point in the history
* [Rahul] | BAH-3528 | Add. uploaded-files Sub Directory And Set Permissions

* [Rahul] | BAH-3528 | Add. Persistent Volume Claim For Uploaded Files
  • Loading branch information
rahu1ramesh authored Feb 5, 2024
1 parent b6904a1 commit c799b6d
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions package/docker/openmrs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ RUN ln -s /etc/bahmni_config ${OPENMRS_APPLICATION_DATA_DIRECTORY}/bahmni_config
RUN mkdir -p /home/bahmni/patient_images
RUN mkdir -p /home/bahmni/document_images
RUN mkdir -p /home/bahmni/uploaded_results
RUN mkdir -p /home/bahmni/uploaded-files
COPY package/resources/blank-user.png /etc/bahmni/

# Used by envsubst command for replacing environment values at runtime
Expand Down
1 change: 1 addition & 0 deletions package/docker/openmrs/bahmni_startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ then
echo "setting the folder permissions"
setfacl -R -d -m o::rx -m g::rx /home/bahmni/document_images
setfacl -R -d -m o::rx -m g::rx /home/bahmni/uploaded_results
setfacl -R -d -m o::rx -m g::rx /home/bahmni/uploaded-files
fi

echo "Running OpenMRS Startup Script..."
Expand Down
5 changes: 5 additions & 0 deletions package/helm/openmrs/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ spec:
name: bahmni-config
- mountPath: /home/bahmni/uploaded_results
name: bahmni-uploaded-results
- mountPath: /home/bahmni/uploaded-files
name: bahmni-uploaded-files
restartPolicy: Always
volumes:
# - name: openmrs-data
Expand All @@ -101,3 +103,6 @@ spec:
- name: bahmni-uploaded-results
persistentVolumeClaim:
claimName: bahmni-uploaded-results-pvc
- name: bahmni-uploaded-files
persistentVolumeClaim:
claimName: bahmni-uploaded-files-pvc
14 changes: 14 additions & 0 deletions package/helm/openmrs/templates/volumes/bahmni-uploaded-files.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
app: {{ .Chart.Name }}
environment: {{ .Values.metadata.labels.environment }}
name: bahmni-uploaded-files-pvc
spec:
storageClassName: {{ .Values.global.storageClass }}
accessModes:
- ReadWriteMany
resources:
requests:
storage: {{ .Values.volumes.uploadedFiles.capacity }}
2 changes: 2 additions & 0 deletions package/helm/openmrs/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ volumes:
capacity: "1Gi"
uploadedResults:
capacity: "2Gi"
uploadedFiles:
capacity: "2Gi"
nodeSelector: {}
affinity: {}
tolerations: {}

0 comments on commit c799b6d

Please sign in to comment.