Graphicsmagick not working in Elastic Beanstalk with nodejs and S3

后端 未结 2 1185
攒了一身酷
攒了一身酷 2021-01-13 17:08

I\'m using nodejs and graphicsmagick to process images with text, then streaming the final jpg to S3.

Using postman, I was able to test this flow on my localhost an

相关标签:
2条回答
  • 2021-01-13 17:31

    How are you installing GraphicsMagick on your EC2 instance in ElasticBeanstalk? Are you using a custom AMI? The default AMI (at least the ones I've used) didn't have GraphicsMagick, I don't know about ImageMagick though.

    You can use container commands to install packages with yum. I used the one below on a project where I needed GraphicsMagick.

    Create a folder at the root of your project with the name ".ebextensions." Inside of that folder, create a file called "package.config" with the following contents:

    commands:
      01-command:
        command: yum install -y --enablerepo=epel GraphicsMagick
    

    This will install it when the instance is created. I have a feeling this should resolve your issue, if not you may want to use command line options for yum to use the same version or install the delegates as well:

    commands:
      01-command:
        command: yum install -y --enablerepo=epel GraphicsMagick
      02-command:
        command: yum install -y --enablerepo=epel GraphicsMagick-devel
    
    0 讨论(0)
  • 2021-01-13 17:50

    I lowered my elasticbeanstalks' nodejs version from node 12 to node 8.15.0, and yum CAN find Graphicsmagick and installs it successfully. (I listed Graphicsmagick in .ebextensions/packages.config) Hope this will help someone!

    0 讨论(0)
提交回复
热议问题