Connect to a Heroku app after directory (and all other data) deleted on local machine - heroku

I lost all the data on my localmachine (Macbook Pro) and, to make matters worse, the repo for a Rails app hosted on Heroku has also been deleted on github. Since I lost all the data on my localmachine, whatever security keys I had installed have also been deleted so if I try to connect to Heroku it won't even recognize me. What can I do in this situation to download the app and export the database?

Are you still able to log into heroku.com? If so, you should be able to set up the heroku CLI again with a new public key. Then you should be able to use heroku git:clone APP to get the code from heroku.
With your database, there should be options for managing it on heroku.com or via the heroku CLI (e.g. heroku pg:pull if you're using postgres).

Related

Deploying Laravel on Heroku through github getting forbidded 403 page

I am deploying a Laravel application to Heroku. I just installed a Laravel project. But did not make any changes because I installed it just to try out the Laravel deployment on the Heroku. Then I created repository. Then I created a pipeline and a production app within it on the Heroku. Then I synced the production app to the master branch of my Github repo.
This is the screenshot
Then I configured the env variables in the Heroku like this.
When I open or view the app on the browser, it says 403 forbidden. What is wrong with and how can I fix it?
https://devcenter.heroku.com/articles/getting-started-with-laravel
To deploy your application to Heroku, you must first create a Procfile, which tells Heroku what command to use to launch the web server with the correct settings. After you’ve done that, you’re going to create an application instance on Heroku, configure some Laravel environment variables, and then simply git push to deploy your code!

Delete one of the two app on the heroku account

I'm new to Heroku. I've mistakenly created second app on my account and now I can't execute heroku open command to see my app running on the server. I'm posting the screen of the error message. I need only the one named guarded-wildwood-67162. How can I delete other app - shielded-sea-53572?
To permanently destroy a Heroku app you can use heroku apps:destroy --app <app-name> or use the Heroku web interface. Note that this doesn't just disconnect the app; it completely destroys it.

Deploying a secret certificate file to Heroku from CI (Codeship)

An app I am building integrates with a 3rd party api. For access to this api it authenticates via oauth using the RSA-SHA1 signature method which requires a certificate file.
The app is continuously deployed on heroku (php) using codeship.
I don't want to check the certificate into source control for a variety of reasons but need a way to copy the certificate to the production dyno every time the app is deployed. This is because Heroku dynos are stateless so revert themselves when the app is deployed (as I understand it).
What is the best way to copy this certificate to my dyno? I thought of using a command like this but it fails to work:
heroku run "echo \"${CERTDATA}\" > ./storage/certs/my_cert.pem"
I could store the actual certificate data in an environment variable on Codeship so it would be always available.
Alternatively I could create the cert file in Codeship and then force add it to the git deployment to Heroku. Can anyone give any guidance here?
Why not just store the actual certificate data in an env var on Heroku?

Configure APNS on Parse Server

I'm trying to migrate from Parse.com service to a self-hosted Parse Server, and it's been a bit difficult.
Basically I set up my server like this:
Run $ npm install -g parse-server
Set env vars (PARSE_SERVER_DATABASE_URI, PARSE_SERVER_MASTER_KEY, PARSE_SERVER_APPLICATION_ID)
Run $ parse-server
Everything is up and running, and I also setup a machine running parse-dashboard in a very similar way.
I had already synced the database and had no problems with it.
The problem is that when I try to send a push notification, I get the message:
Missing push configuration
I believe that's connected to the APNS settings. In Parse.com dashboard we can add the APNS certificates, but on the self hosted dashboard there is no such option (or I couldn't find it).
What am I missing? How do I set theses things up?
I believe that running parse-server without the recommended Express wrapper does not give me full control of everything I needed to configure the application.
I created an Express app, started the serving using the guide #thailey01 suggested and now it works.

Logging into Heroku Fails - shell access

O.k. so maybe I'm missing something basic here, but when I run heroku login I get the usual email and password prompt.
At this point I would assume I'm logged into the Heroku dino just a I would using my local box.
Instead I get a message telling me I'm logged in, but I'm still on my local box.
Is there really no shell access for Heroku apps?
You can open a dynamic session with this command:
heroku run bash
However, please be aware that Heroku runs applications on dynos: https://devcenter.heroku.com/articles/dynos
No, you can't directly access the Heroku dynos. You can run commands through the CLI, such as getting logs, adding add-ins, etc.
Logging in through the CLI, as you have done, is simply setting your credentials for Heroku locally. They are subsequently used for running commands so you don't always have to reauthenticate.
heroku login doesn't open a new terminal session like ssh would. Instead, it just remembers your profile so that when you call heroku with a different command (like heroku create to create a new app) you won't be prompted for email and password again.
You can also push your code to the app with git push heroku master once you are logged in.
You can do some hackery (like using this plugin) to ssh into your dyno, but that's not the way heroku is supposed to work. The idea behind heroku is that you just push your code there and it manages everything else for you.

Resources