App reviews, troubleshooting, and recommendations
Hi there,
I followed the new SHopify CLI 3.0 tutorial to create apps. When uploading, the documentation states to create this heroku.yml file with this content:
build:
docker:
web: Dockerfile
config:
SHOPIFY_API_KEY: <SHOPIFY_API_KEY>
Then populate Heroku env with variables such as keys, host, etc
At first, I left the heroku.yml exactly like this, thinking it would be filled up from Heroku env. But when testing the <SHOPIFY_API_KEY> would show in the url and the app was not working.
So, I replaced it in this file with the real value to see if it worked, it did.
Can it be that my app was not correctly fetching the Heroku variable or do we actually need to add the key there manually?
Best,
Jeremie
I noticed the same thing. I was expecting the heroku.yml variables to be passed to docker. It looks like it only works when hard coded.
Poor documentation on CLI and Docker, all is a bit of a mess
I agree!
Realised same thing today. How do you guys handle different environments when api key is hard coded? For example an heroku pipeline with a test stage for example MyApp-test (using credentials from MyApp-test in shopify) and MyApp-prod (using credentials from MyApp-prod in Shopify) the api key is needed to change.
Encountering this issue as well, it seems that heroku.yml supplies the env variable to the dockerfile. This is pretty annoying needing to commit sensitive api keys for deployments
I'm having the same issue. Frustrating that the tutorial doesn't address this.
We are having the same issue, can you guys share how you solved this to avoid hardcoding the Shopify key in the heroku.yml file?
No way to avoid hardcoding since SHOPIFY_API_KEY in heroku.yml file is build-time environment variable
My colleague spoke with the Heroku team before and it looks like you need to build your images and push them yourself vs. using the heroku.yml file
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025