I have followed the tutorial to generate the .render-buildpacks.json file with your CLI plugin which holds my Heroku build packs and then added them to my project root. I have then redeployed the app, but when I try to upload a file to google storage I receive an error that it can’t authenticate, so the buildpack isn’t installed.
What am I doing wrong, and how can I install the buildpack correctly?
I have fixed the issue by manually authenticating google storage, without the buildpack. But it will really be beneficial to know how to install buildpacks on already running apps. Thanks!
Buildpacks are not natively supported by Render. The Heroku to Render migration tool simply recreates a Heroku environment in Docker. Is your project using the Docker environment with the Dockerfile.render created in the migration process? That’s where the .render-buildpacks.json would be read.
It usually works out a lot simpler to use a Render Native Environment to avoid some of the complications of bringing over Heroku’s Dockerized stack to our platform.
It looks like it’s just taking some credentials in Heroku config vars and writing them to a file.
You could achieve the same on Render by creating your google-credentials.json as a secret file in the “Environment” tab of the service. It would be available in the root of your project & /etc/secrets/google-credentials.json. If you needed it somewhere else, you could add a copy command to the beginning of your Build and/or Start Commands, e.g. cp /etc/secrets/google-credentials.json ./my/required/path/google-credentials.json && your_build_or_start_commands