alvarcarto / url-to-pdf-api

Web page PDF/PNG rendering done right. Self-hosted service for rendering receipts, invoices, or any content.
MIT License
7.01k stars 774 forks source link

setting this project up without Heroku #13

Closed lmj0011 closed 5 years ago

lmj0011 commented 6 years ago

I'm interested in running this project from an AWS EC2 instance.

I should have no problems doing that following these instructions correct? https://github.com/alvarcarto/url-to-pdf-api#development

adrianfalleiro commented 6 years ago

You'll also need to make sure your EC2 instance has Chrome installed.

lmj0011 commented 6 years ago

Headless Chrome or just the regular Chrome, also which version?

adrianfalleiro commented 6 years ago

I believe you need Chrome 59+

Puppeteer (the library that this project uses to interact with Chrome) will launch the browser in headless mode.

lmj0011 commented 6 years ago

I believe you need Chrome 59+

Confirmative https://www.chromestatus.com/feature/5678767817097216


Headless Chrome or just the regular Chrome, also which version?

For some reason, I thought those were 2 different things :smile_cat:

kimmobrunfeldt commented 6 years ago

Puppeteer should download a correct Chrome binary by default installed. So there shouldn't be a need to download the Chrome separately, just npm install in this repo and it should work.

However you may need to install some dependencies via apt-get. You can find some details here: https://github.com/GoogleChrome/puppeteer/issues/807

microbox commented 6 years ago

I just published a travis auto build docker image for this project. You can setup this project using one single line of docker command:

docker run -d -p 80:80 --name url2pdf microbox/node-url-to-pdf-api

for more details, please checkout https://github.com/microbox/node-url-to-pdf-api

PS: The image size is 286MB !!! The new size is 264MB

kimmobrunfeldt commented 5 years ago

Docker image released by @microbox would be the way to go from my point of view. I updated this also into the readme. Thanks!