Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bash: heroku: command not found #1

Open
jerinpetergeorge opened this issue Sep 2, 2021 · 1 comment
Open

bash: heroku: command not found #1

jerinpetergeorge opened this issue Sep 2, 2021 · 1 comment

Comments

@jerinpetergeorge
Copy link

Everything was perfect, except this line -

acm/cert.sh

Line 29 in b5085d4

heroku certs:update "/app/.acme.sh/$DOMAIN/fullchain.cer" "/app/.acme.sh/$DOMAIN/$DOMAIN.key" --confirm $HEROKU_APP --app $HEROKU_APP

It seems the dyno couldn't find the Heroku binary. How can I run the command successfully?

The script that I have used

#!/bin/sh
set -e

# NEEDS THE FOLLOWING VARS IN ENV:
# DOMAIN
# CLOUDFLARE_TOKEN
# CLOUDFLARE_ACCOUNT_ID
# HEROKU_API_KEY
# HEROKU_APP

git clone https://github.com/Neilpang/acme.sh.git
cd ./acme.sh

# Force ensures it doesnt fail because of lack of cron
./acme.sh --install --force

# Map to environment variables that the ACME script requires
export CF_Token=$CLOUDFLARE_TOKEN
export CF_Account_ID=$CLOUDFLARE_ACCOUNT_ID

# Generate wildcard certificate (this will take approx 130s)
~/.acme.sh/acme.sh --server letsencrypt --issue -d $DOMAIN  -d "*.$DOMAIN"  --dns dns_cf

# Update the certificate in the live app
heroku certs:update "/app/.acme.sh/$DOMAIN/fullchain.cer" "/app/.acme.sh/$DOMAIN/$DOMAIN.key" --confirm $HEROKU_APP --app $HEROKU_APP
@frodsan
Copy link

frodsan commented Sep 16, 2021

You probably need to add https://elements.heroku.com/buildpacks/heroku/heroku-buildpack-cli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants