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?
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
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
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
Make the shift from discounts to donations, and witness your business not only thrive fina...By Holly Dec 4, 2023
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...By Arno Nov 27, 2023
You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...By Skye Nov 8, 2023