Docker-compose example.

  • I am trying to run jsreport on docker -compose

    version: '3.3'
    image: jsreport/jsreport:3.10.0
    - "5488:5488"
    restart: unless-stopped
    - "./data:/app/data"
    - "./jsreport.config.json:/app/jsreport.config.json"

    but I am getting following errror.

    jsreport_1 | 2023-02-25T23:42:32.653Z - error: Error occurred during reporter init: Error: Error when loading extension fs-store@3.2.4
    jsreport_1 | Error: EACCES: permission denied, mkdir '/app/data/storage'
    jsreport_1 | at Object.mkdirSync (node:fs:1382:3)
    jsreport_1 | at module.exports (/app/node_modules/@jsreport/jsreport-fs-store/lib/blobStorageProvider.js:8:8)
    jsreport_1 | at Object.module.exports (/app/node_modules/@jsreport/jsreport-fs-store/lib/main.js:36:75)
    jsreport_1 | at Object._useOne (/app/node_modules/@jsreport/jsreport-core/lib/main/extensions/extensionsManager.js:226:75)

  • administrators

    hi @hismayilov

    I've tried the same docker-compose file and it works just fine for me, no errors about the permissions.

    I have tried it in two cases:

    1. having no data folder, in this case, the jsreport docker creates it for me
    2. having data folder but empty, in this case the jsreport docker creates the rest of child files for me too.

    Perhaps if you have an existing data folder with files in there that were created from another place (perhaps another jsreport server instance) and you just copied it to your docker compose directly, there maybe be some permissions checks you should check there, unfortunately, in this case, it is something we can not know what can be wrong with it.

    another solution you can try is to add user: jsreport in your docker-compose to ensure the docker is running with the jsreport user present in the image.

  • Same. :(

  • administrators

    did you tried with sudo docker-compose up? permissions are tricky, perhaps the way docker was installed on your server requires that you use sudo

  • 0_1677971104804_upload-aacf164f-4df8-4aee-81a4-df096775a533

  • administrators

    unfortunately, i don't have any other ideas to help debug the permissions issue, but it is interesting that when you use the sudo it throws a different error, there must be something weird going on with your folder permissions.

Log in to reply

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.