I get it to work with your docker run
command. But it does not work in my docker-compose environment. What could differ?
My Dockerfile is quite minimalistic. I don't think the prolem is here:
FROM --platform=linux/arm64 jsreport/jsreport:4.7.0
COPY .npmrc /app/.npmrc
ARG NPM_TOKEN
RUN cd /app && npm install \
handlebars-helpers \
node-fetch \
i18next \
i18next-locize-backend \
bwip-js \
@plantrail/ddp
RUN cd /app && npm ls
My jsreport.config.json is quite old. Maybe something deprecated is in here?
{
"encryption": {
"secretKey": "secret"
},
"logger": {
"console": { "transport": "console", "level": "debug" }
},
"workers": { "numberOfWorkers": 4 },
"reportTimeout": 600000,
"httpPort": 5488,
"allowLocalFilesAccess": true,
"store": {
"provider": "fs"
},
"blobStorage": {
"provider": "fs"
},
"extensions": {
"chrome-pdf": {
"strategy": "chrome-pool",
"numberOfWorkers": 10
},
"express": {
"inputRequestLimit": "100mb",
"enabled": true
},
"child-templates": {
"parallelLimit": 20
},
"fs-store": {
"sync": {
"usePolling": false
}
},
}
}
This is the jsReport section from my docker-compose.yaml. I just added the chrome launch options, but it didn't work:
jsreport4:
build:
context: ../services/jsreport4
args:
- NPM_TOKEN
environment:
- mode=development
- chrome_launchOptions_args=--no-sandbox, --disable-dev-shm-usage, --disable-gpu
expose:
- '5488'
ports:
- '5487:5488'
volumes:
- ../services/jsreport4/mounted:/jsreport
The console.log can be seen in the chrome console:
sending req.context.logs to the console at the server in afterRender shows other logs, but not the log from my script tag.