Heroku Not Finding Doppler

Hi

I am trying to deploy the below code to Heroku:

https://gitlab.com/upchieve/subway:

However I am getting the below message:

bash: line 1: ./doppler: No such file or directory

The Procfile is as below:

I have already installed the doppler. Can you help me with this?

Thanks.

Hi @Hassan_Afzali-Kusha!

Welcome to the Doppler Community!

First off – are you using a buildpack that installs the Doppler CLI? If not, how are you installing it?

Second, I actually would recommend that you use our Heroku sync integration that will sync your Doppler secrets to your Heroku config automatically. That will alleviate the need to have the Doppler CLI at all.

Regards,
-Joel

1 Like

Hi Joel,

Good morning,

Thank you very much for your reply.

First off – are you using a [buildpack] that installs the Doppler CLI? If not, how are you installing it?
Is there any official buildpack for doppler? I have not seen any offcial. Moreover, the only thing I found was the below:

Second, I actually would recommend that you use our Heroku sync integration that will sync your Doppler secrets to your Heroku config automatically. That will alleviate the need to have the Doppler CLI at all.
I have done it and it is getting only 5 secrets. I am not sure if these are all the secrets. First of all how can I make sure I have all the secrets? if I have all the secrets, I can remove the HOME=/tmp/ ./doppler run --configuration /tmp/doppler.yaml -- part?

Thank you very much.

There isn’t currently an official buildpack. This is mostly due to the fact that we have a sync integration which (generally speaking) is far superior to using the CLI. As far as the buildpack you found, it looks like what it does is fetch your secrets using the DOPPLER_TOKEN you have defined and stash them in a .env file located in the build directory. I’m not 100% sure where it’s stashing the binary file, but based on the error you’re seeing, it seems like it’s not in the same directory the app is executing from and the buildpack isn’t adding it to the PATH.

I’m not sure what you mean here. Your screenshot shows that you only have 5 secrets in your Doppler project, so only 5 secrets would get synced to Heroku. This is a one-way sync from Doppler to Heroku, so the basic idea here is that you’d add all your application secrets to Doppler, setup the Heroku sync, and then it would sync those secrets to Heroku. Your application could then access them in the environment. Then, if you need to update a secret, you would just change it in Doppler, save, and the sync will automatically update it Heroku. You can confirm this using the heroku config command and it’s sub-commands.

In terms of how to update your Procfile, you would basically update it to look like this:

web: npm start
worker: npm run worker
local-web: npm run start-local
local-worker: npm run worker-local