Deploying puppeteer on fly.io
- tags
- puppeteer
- flyio
- ai
Contents
Test Script
| |
screenshot.js
| |
Simple server
We aren't going to plug this into anything, just want to have something that fly can serve up.
| |
| |
Dockerfile
Now the fun. First we install node and npm, then we install
google-chrome-stable from google's repositories. We will download
chrome again when we do npm i but this will take care of all the
dependancies which are extensive.
| |
Deploy
| |
Then
| |
And inside of there, you should be able to run
| |
Very meta
Not downloading chrome twice
Inside of Dockerfile before npm i, add
| |
And then pass the path of chrome when you start up puppeteer:
| |
Previously
Next