This is what we end of doing:
jsreport.config.json
{
"store": {
"provider": "fs"
},
"mountOnAppPath": true,
"trustUserCode": true,
"extensions": {
"fs-store": {
"persistence": {
"provider": "azure-storage"
}
},
"fs-store-azure-storage-persistence": {
"accountName": "x",
"accountKey": "xx"
}
}
}
This is the Dockerfile to create [name].azurecr.io/my-jsreport-image:1.1
FROM jsreport/jsreport:3.9.0
COPY --chown=jsreport:jsreport jsreport.config.json /app
#add here the license key
COPY --chown=jsreport:jsreport license-key.txt /app
RUN npm install @jsreport/jsreport-fs-store-azure-storage-persistence
The deployment to Kubernetes was this
apiVersion: apps/v1
kind: Deployment
metadata:
name: jsreport
labels:
app: jsreport
spec:
replicas: 1
selector:
matchLabels:
app: jsreport
template:
metadata:
labels:
app: jsreport
spec:
serviceAccountName: jsreport
containers:
- name: jsreport
image: [name].azurecr.io/my-jsreport-image:1.1
ports:
- containerPort: 5488
resources:
requests:
memory: 512Mi
cpu: "250m"
limits:
memory: 3Gi
cpu: "2"
env:
- name: extensions_fsStoreAzureStoragePersistence_accountName
value: [account name]
- name: extensions_fsStoreAzureStoragePersistence_accountKey
value: [account key]