How can I add the pupeeteer buildpack in fly.io which is something similar to heroku.

I’m trying to migrate my app from Heroku to Fly.io. I was done with the overall app configuration. But In Heroku I’m using two buildpacks Heroku Puppeteer and Google Chrome Buildpack for running the app. So I want to configure similar buildpacks in the fly as well.

If someone has any idea of how to configure it, please help. That would be really appreciated.

Assuming you are not running Rails 7 with importmaps, you already have node installed the Dockerfile, and presumably puppeteer in your package.json. If so, puppeter will be installed for you by yarn.

What remains to be done is to install Google Chrome and to tell puppeteer not to install chromium. This can be done within the Dockerfile you already have. Instructions to do so can be found here: How to use Puppeteer inside a Docker container - DEV Community 👩‍💻👨‍💻

Put the ENV statement before the yarn install in your Dockerfile.

Put the RUN statement after the following in your Dockerfile:

# install deployment packages

FROM base

Hi @rubys, We are not using importmaps, but we are using Rails 7. This is our project for the reference GitHub - saeloun/miru-web: Miru | Time Tracking and Invoicing and Employee Benefits

Excellent. It is open source, so if you ever get really stuck, post reproduction instructions and I will try to help. I can’t guarantee 24/7 support, but I am interested in seeing applications like this one being well supported by fly.io.

As an example, things like “if you have a package.json file, and it mentions puppeteer, then add the following to your Dockerfile” is an example of instructions that computers are good at. Compare the Dockerfile that fly launch produced for you with the following: fly.io-rails/Dockerfile.erb at main · rubys/fly.io-rails · GitHub - that’s not exactly the template you used, but it is work in progress for supporting Terraform · Fly Docs

I also see that you send and receive mail. Working through that with a real application is something I am very much interested in.

Incidentally, I know of a small business that could use an app like this one. Where is the best place to ask questions? Github issues?

Thanks @rubys, puppeteer worked :slight_smile: . Also, we are really great if we get support from your side. And you can ask questions in GitHub issues.