Hi @AndRew_SIT, I believe there are two ways to add environment variables to Heroku.
- Through your apps Heroku dashboard.
- Through the Heroku CLI.
Dashboard
In your Heroku app, click on “Settings”. Then scroll to the “Config Vars” section and you will see a button labeled “Reveal Config Vars.” This is where you should add your environment variables for Strapi (Cloudinary vars, database vars, and others).
CLI
Here is the Strapi doc for the Heroku database set up. It’s essentially the same process for setting the Cloudinary vars. See #7 “Heroku database set up”.
So what I set as vars in Heorku were my Cloudinary KEY, NAME, and SECRET.
Just a bit more context for others…
Local set up
If I understand this all correctly, the dotenv file will only be used to read my vars in non-production environments (i.e. locally). Dotenv files get .gitignore’d during deployment.
Production set up
Therefore if we set up the Cloudinary vars in Heroku’s production server, Strapi will have the configuration necessary to connect to Cloudinary in production.